mirror of
https://github.com/goreleaser/goreleaser-action.git
synced 2026-05-20 17:31:54 +00:00
fix: do not get releases.json if version is specific (#502)
closes #489
This commit is contained in:
parent
a386515f0c
commit
9a6cd01b33
4 changed files with 29 additions and 2 deletions
|
|
@ -86,6 +86,18 @@ describe('getRelease', () => {
|
|||
expect(release?.tag_name).toEqual('v2.7.0');
|
||||
});
|
||||
|
||||
it('skips JSON check for specific version v2.8.1', async () => {
|
||||
const release = await github.getRelease('goreleaser', 'v2.8.1');
|
||||
expect(release).not.toBeNull();
|
||||
expect(release?.tag_name).toEqual('v2.8.1');
|
||||
});
|
||||
|
||||
it('skips JSON check for specific version without v prefix', async () => {
|
||||
const release = await github.getRelease('goreleaser', '2.8.1');
|
||||
expect(release).not.toBeNull();
|
||||
expect(release?.tag_name).toEqual('v2.8.1');
|
||||
});
|
||||
|
||||
it('unknown GoReleaser Pro release', async () => {
|
||||
await expect(github.getRelease('goreleaser-pro', 'foo')).rejects.toThrow(
|
||||
new Error('Cannot find GoReleaser release foo in https://goreleaser.com/static/releases-pro.json')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue