Skip to content

Commit c7c9447

Browse files
authored
feat: support oss nightlies (#424)
* feat: support oss nightlies Signed-off-by: Carlos Alexandro Becker <[email protected]> * fix: test --------- Signed-off-by: Carlos Alexandro Becker <[email protected]>
1 parent 920a7cb commit c7c9447

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ jobs:
212212
- windows-latest
213213
distribution:
214214
- goreleaser-pro
215+
- goreleaser
215216
steps:
216217
-
217218
name: Checkout
@@ -235,5 +236,5 @@ jobs:
235236
run: |
236237
goreleaser check -f ./test/.goreleaser.yml
237238
goreleaser --version
238-
goreleaser --version | grep pro-nightly
239+
goreleaser --version | grep nightly
239240

__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 GitHub release', async () => {
36+
const release = await github.getRelease('goreleaser', 'nightly');
37+
expect(release).not.toBeNull();
38+
expect(release?.tag_name).not.toEqual('');
39+
});
40+
3541
it('returns nightly GoReleaser Pro GitHub release', async () => {
3642
const release = await github.getRelease('goreleaser-pro', 'nightly');
3743
expect(release).not.toBeNull();

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing 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 about customizing how changed files appear on GitHub.

src/github.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const getRelease = async (distribution: string, version: string): Promise
1515
};
1616

1717
export const getReleaseTag = async (distribution: string, version: string): Promise<GitHubRelease> => {
18-
if (distribution === 'goreleaser-pro' && version === 'nightly') {
18+
if (version === 'nightly') {
1919
return {tag_name: version};
2020
}
2121
const tag: string = (await resolveVersion(distribution, version)) || version;

0 commit comments

Comments
 (0)