Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit336e299

Browse files
authored
feat: support nightly (#419)
* feat: support nightlySigned-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>* chore: nightly testSigned-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>* chore: typoSigned-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>---------Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
1 parent3724734 commit336e299

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

‎.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,40 @@ jobs:
200200
name:Check dist
201201
run:|
202202
tree -nh ./test/_output
203+
204+
nightly:
205+
runs-on:${{ matrix.os }}
206+
strategy:
207+
fail-fast:false
208+
matrix:
209+
os:
210+
-ubuntu-latest
211+
-macOS-latest
212+
-windows-latest
213+
distribution:
214+
-goreleaser-pro
215+
steps:
216+
-
217+
name:Checkout
218+
uses:actions/checkout@v3
219+
with:
220+
fetch-depth:0
221+
-
222+
name:Set up Go
223+
uses:actions/setup-go@v4
224+
with:
225+
go-version:1.18
226+
-
227+
name:GoReleaser
228+
uses:./
229+
with:
230+
install-only:true
231+
distribution:${{ matrix.distribution }}
232+
version:nightly
233+
-
234+
name:Check
235+
run:|
236+
goreleaser check -f ./test/.goreleaser.yml
237+
goreleaser --version
238+
goreleaser --version | grep pro-nightly
239+

‎__tests__/github.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ describe('getRelease', () => {
3232
expect(release?.tag_name).not.toEqual('');
3333
});
3434

35+
it('returns nightly GoReleaser Pro GitHub release',async()=>{
36+
constrelease=awaitgithub.getRelease('goreleaser-pro','nightly');
37+
expect(release).not.toBeNull();
38+
expect(release?.tag_name).not.toEqual('');
39+
});
40+
3541
it('returns v0.182.0 GoReleaser Pro GitHub release',async()=>{
3642
constrelease=awaitgithub.getRelease('goreleaser-pro','v0.182.0');
3743
expect(release).not.toBeNull();

‎dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎src/github.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export const getRelease = async (distribution: string, version: string): Promise
1515
};
1616

1717
exportconstgetReleaseTag=async(distribution:string,version:string):Promise<GitHubRelease>=>{
18+
if(distribution==='goreleaser-pro'&&version==='nightly'){
19+
return{tag_name:version};
20+
}
1821
consttag:string=(awaitresolveVersion(distribution,version))||version;
1922
constsuffix:string=goreleaser.distribSuffix(distribution);
2023
consturl=`https://goreleaser.com/static/releases${suffix}.json`;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp