Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support oss nightlies #424

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ jobs:
- windows-latest
distribution:
- goreleaser-pro
- goreleaser
steps:
-
name: Checkout
Expand All @@ -235,5 +236,5 @@ jobs:
run: |
goreleaser check -f ./test/.goreleaser.yml
goreleaser --version
goreleaser --version | grep pro-nightly
goreleaser --version | grep nightly

6 changes: 6 additions & 0 deletions __tests__/github.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ describe('getRelease', () => {
expect(release?.tag_name).not.toEqual('');
});

it('returns nightly GoReleaser GitHub release', async () => {
const release = await github.getRelease('goreleaser', 'nightly');
expect(release).not.toBeNull();
expect(release?.tag_name).not.toEqual('');
});

it('returns nightly GoReleaser Pro GitHub release', async () => {
const release = await github.getRelease('goreleaser-pro', 'nightly');
expect(release).not.toBeNull();
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const getRelease = async (distribution: string, version: string): Promise
};

export const getReleaseTag = async (distribution: string, version: string): Promise<GitHubRelease> => {
if (distribution === 'goreleaser-pro' && version === 'nightly') {
if (version === 'nightly') {
return {tag_name: version};
}
const tag: string = (await resolveVersion(distribution, version)) || version;
Expand Down
Loading