Compare commits

...
60 Commits
Author SHA1 Message Date
Carlos Alexandro BeckerandGitHub 70eb4e573c feat: support downloading goreleaser pro (#284) 2021-05-27 00:25:31 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>CrazyMax
a3b2f49e7c chore(deps): bump @actions/core from 1.2.7 to 1.3.0 (#283)
* chore(deps): bump @actions/core from 1.2.7 to 1.3.0

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.7 to 1.3.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>

* Update generated content

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-05-24 19:06:23 +02:00
8571fa911c fix(ci): pin actions to major (#282)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-05-12 15:26:14 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a604a9b2f7 chore(deps): bump crazy-max/ghaction-import-gpg from 3 to 3.1.0 (#277)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 10:14:55 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
239f064349 chore(deps): bump actions/checkout from 2 to 2.3.4 (#278)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 10:11:27 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ab4f17620b chore(deps): bump codecov/codecov-action from 1 to 1.5.0 (#279)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 1.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1...v1.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 10:11:15 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
15c488ce8f chore(deps): bump docker/bake-action from 1 to 1.4.0 (#280)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 1 to 1.4.0.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v1...v1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 10:11:03 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
f08023819a chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#276)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 19:14:08 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4921ce3062 chore(deps): bump lodash from 4.17.19 to 4.17.21 (#275)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-11 19:11:28 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>CrazyMax
6b584eeb7a chore(deps): bump @actions/core from 1.2.6 to 1.2.7 (#273)
* chore(deps): bump @actions/core from 1.2.6 to 1.2.7

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.6 to 1.2.7.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>

* chore: update generated content

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-04-16 11:58:36 +02:00
CrazyMax 5e15885530 chore: update changelog 2021-03-31 00:06:25 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>CrazyMaxCrazyMax
748d6973af chore(deps): bump @actions/http-client from 1.0.9 to 1.0.11 (#270)
* chore(deps): bump @actions/http-client from 1.0.9 to 1.0.11

Bumps [@actions/http-client](https://github.com/actions/http-client) from 1.0.9 to 1.0.11.
- [Release notes](https://github.com/actions/http-client/releases)
- [Changelog](https://github.com/actions/http-client/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/http-client/commits)

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): update generated content

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-03-30 23:59:14 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0e0aa65c79 chore(deps): bump y18n from 4.0.0 to 4.0.1 (#272)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-30 23:51:56 +02:00
b458824747 chore: enhance workflow (#271)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-03-30 23:48:02 +02:00
CrazyMax d8a076a057 Rename Dockerfile 2021-03-18 19:06:55 +01:00
CrazyMax e1c89b9548 Update Dockerfile 2021-03-18 19:05:39 +01:00
CrazyMax e64074c2ea 2021 2021-01-06 21:07:29 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
edea00d0c6 chore(deps): bump node-notifier from 8.0.0 to 8.0.1 (#263)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-22 17:41:30 +00:00
CrazyMax 56f5b77f7f Do not overwrite GORELEASER_CURRENT_TAG if already declared (#260) 2020-12-02 16:50:57 +01:00
CrazyMax c1dfc73b78 Fix workflow 2020-12-01 20:41:26 +01:00
CrazyMax 97d4c6b042 Update CI workflow 2020-12-01 20:40:45 +01:00
CrazyMax 0e7950faac Update CHANGELOG 2020-11-30 01:04:35 +01:00
09ce14113d fix: Set GORELEASER_CURRENT_TAG (#259)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-11-30 00:00:15 +00:00
50de962f84 Upload artifact example (#257)
* docs: Upload artifact example (#254)

* Fix README

* Typo

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-11-29 23:57:19 +00:00
a61bc075fd feat: Container based developer flow (#258)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-11-22 22:34:12 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d19982d4d2 chore(deps): bump @actions/tool-cache from 1.6.0 to 1.6.1 (#256)
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-18 19:08:40 +00:00
CrazyMax 499c61b7c5 Update CHANGELOG 2020-11-06 21:36:16 +01:00
CrazyMax ddc7bc8b43 fix: CI workflow 2020-11-06 21:30:01 +01:00
CrazyMax 9c48726d5e chore: Use major version of actions 2020-11-06 21:26:05 +01:00
CrazyMax d0f90f55ae feat: Add install-only test job and fix action.yml 2020-11-06 21:23:51 +01:00
f2a4c95ec7 feat: Add install-only option for using goreleaser in user scripts (#252)
Co-authored-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2020-11-06 20:21:22 +00:00
CrazyMax 3d57a20621 Add install-only test job and fix action.yml 2020-11-06 21:18:48 +01:00
CrazyMaxandGitHub 3f5ecc4e17 Merge branch 'master' into install-only-option 2020-11-06 21:00:40 +01:00
CrazyMax 70364181ef Do not test signing keys on PR 2020-11-06 20:48:03 +01:00
Arunvel Sriram 7007251a74 feat: Add install-only option for using goreleaser in user scripts 2020-11-06 21:57:01 +05:30
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c5a3850c06 chore(deps): bump actions/checkout from v2.3.3 to v2.3.4 (#253)
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.3 to v2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.3...5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-04 13:40:44 -03:00
CrazyMax 4441f834e5 Update generated content 2020-10-21 01:16:26 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e8c391b2a4 chore(deps): bump codecov/codecov-action from v1.0.13 to v1.0.14 (#251)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.13 to v1.0.14.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.13...7d5dfa54903bd909319c580a00535b483d1efcf3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-19 09:59:56 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
608bdefa0e chore(deps): bump @actions/http-client from 1.0.8 to 1.0.9 (#248)
Bumps [@actions/http-client](https://github.com/actions/http-client) from 1.0.8 to 1.0.9.
- [Release notes](https://github.com/actions/http-client/releases)
- [Changelog](https://github.com/actions/http-client/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/http-client/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-13 19:10:19 +00:00
CrazyMax 6389ff5bd2 Update CHANGELOG 2020-10-01 20:08:37 +02:00
CrazyMax 9593cd0a20 Update deps 2020-10-01 20:01:43 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>CrazyMax
d93a2cdf8c chore(deps): bump actions/checkout from v2.3.2 to v2.3.3 (#246)
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.2 to v2.3.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.2...a81bbbf8298c0fa03ea29cdc473d45769f953675)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2020-09-28 19:20:20 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3c2d9ae011 chore(deps): bump @actions/core from 1.2.5 to 1.2.6 (#245)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-28 19:19:59 +00:00
2fc4e3ac51 chore(deps): Import GPG action v3 (#243)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-09-07 13:40:41 +00:00
CrazyMax 097bb3c0c5 Update CHANGELOG 2020-08-27 17:54:55 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d72a78ab06 chore(deps): bump @actions/core from 1.2.4 to 1.2.5 (#240)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.4 to 1.2.5.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-27 15:53:07 +00:00
90d3577f6e fix: Use GITHUB_REF to retrieve tag before checking the most recent tag (#238)
* fix: Use GITHUB_REF to retrieve tag before checking the most recent tag (#238)

* Update tests

* Check also tags sorted by creatordate for the current GITHUB_SHA

* fix: Check tags length

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-08-27 15:28:00 +00:00
CrazyMax 309312125e Update generated content 2020-08-21 13:38:58 +02:00
CrazyMax 46aa4473cd Move zeit/ncc to vercel/ncc 2020-08-21 13:37:00 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5c7fddc6a0 chore(deps): bump codecov/codecov-action from v1.0.12 to v1.0.13 (#237)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.12 to v1.0.13.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.12...6004246f47ab62d32be025ce173b241cd84ac58e)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-18 12:02:56 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
d223864797 chore(deps): bump actions/checkout from v2.3.1 to v2.3.2 (#234)
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.1 to v2.3.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.1...2036a08e25fa78bbd946711a407b529a0a1204bf)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-10 09:57:25 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8be826a5af chore(deps): bump codecov/codecov-action from v1.0.11 to v1.0.12 (#230)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.11 to v1.0.12.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.11...07127fde53bc3ccd346d47ab2f14c390161ad108)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-23 09:47:36 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3a20bfb75b chore(deps): bump codecov/codecov-action from v1.0.10 to v1.0.11 (#229)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.10 to v1.0.11.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.10...6d208f5b527841fb050f92f778e86cb808dacdcb)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 10:41:23 -03:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
bc5f714900 chore(deps): bump lodash from 4.17.15 to 4.17.19 (#228)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 15:30:25 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
28f040b0c9 chore(deps): bump @actions/tool-cache from 1.5.5 to 1.6.0 (#227)
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.5.5 to 1.6.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 08:49:45 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3784b5a5df chore(deps): bump codecov/codecov-action from v1.0.7 to v1.0.10 (#226)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.7 to v1.0.10.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.7...f3570723ef743f6942b6a480461ed0cd6c0f9baa)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-02 08:17:09 -03:00
CrazyMax 8708f57399 Fix workdir (#224) 2020-06-24 02:24:58 +02:00
CrazyMax 044b9d4d64 Update deps 2020-06-24 02:24:36 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0d32e80d56 chore(deps): bump actions/checkout from v2.3.0 to v2.3.1 (#222)
Bumps [actions/checkout](https://github.com/actions/checkout) from v2.3.0 to v2.3.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.0...28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-21 04:45:33 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
eed3dc901e chore(deps): bump actions/checkout from v2 to v2.3.0 (#221)
Bumps [actions/checkout](https://github.com/actions/checkout) from v2 to v2.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...b4483adec309c0d01a5435c5e24eb40de5773ad9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-17 07:55:50 +00:00
30 changed files with 8374 additions and 7680 deletions
+2
View File
@@ -0,0 +1,2 @@
/coverage
/node_modules
+82 -13
View File
@@ -3,14 +3,16 @@ name: ci
on:
schedule:
- cron: '0 10 * * *' # everyday at 10am
pull_request:
branches:
- master
- releases/v*
push:
branches:
- master
- releases/v*
- 'master'
- 'releases/v*'
tags:
- 'v*'
pull_request:
branches:
- 'master'
- 'releases/v*'
jobs:
ci:
@@ -24,7 +26,7 @@ jobs:
- windows-latest
version:
- latest
- v0.117.0
- v0.145.0
steps:
-
name: Checkout
@@ -35,22 +37,55 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.15
-
name: Check
uses: ./
with:
version: ${{ matrix.version }}
args: check --debug
workdir: ./test
-
name: GoReleaser
uses: ./
with:
version: ${{ matrix.version }}
args: release --skip-publish --rm-dist
workdir: ./test
install-only:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- latest
- v0.145.0
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
-
name: GoReleaser
uses: ./
with:
version: ${{ matrix.version }}
install-only: true
-
name: Check
run: |
goreleaser check --debug
signing:
runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request'
strategy:
fail-fast: false
matrix:
@@ -68,20 +103,21 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.15
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
PASSPHRASE: ${{ secrets.PASSPHRASE_TEST }}
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
passphrase: ${{ secrets.PASSPHRASE_TEST }}
-
name: Check
uses: ./
with:
version: latest
args: -f .goreleaser-signing.yml check --debug
workdir: ./test
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
-
@@ -90,5 +126,38 @@ jobs:
with:
version: latest
args: -f .goreleaser-signing.yml release --skip-publish --rm-dist
workdir: ./test
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
upload-artifact:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
-
name: Check
uses: ./
with:
args: check --debug
workdir: ./test
-
name: GoReleaser
uses: ./
with:
args: release --skip-publish --rm-dist
workdir: ./test
-
name: Upload assets
uses: actions/upload-artifact@v2
with:
name: myapp
path: ./test/dist/*
-30
View File
@@ -1,30 +0,0 @@
name: pre-checkin
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
pre-checkin:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Install
run: yarn install
-
name: Pre-checkin
run: yarn run pre-checkin
-
name: Check for uncommitted changes
run: |
if [[ `git status --porcelain` ]]; then
git status --porcelain
echo "::warning::Found changes. Please run 'yarn run pre-checkin' and push"
fi
+14 -20
View File
@@ -3,24 +3,16 @@ name: test
on:
push:
branches:
- master
- releases/v*
paths-ignore:
- '**.md'
- 'master'
- 'releases/v*'
pull_request:
paths-ignore:
- '**.md'
branches:
- 'master'
- 'releases/v*'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ubuntu-latest
steps:
-
name: Checkout
@@ -28,15 +20,17 @@ jobs:
with:
fetch-depth: 0
-
name: Install
run: yarn install
name: Validate
uses: docker/bake-action@v1
with:
targets: validate
-
name: Test
run: yarn run test
uses: docker/bake-action@v1
with:
targets: test
-
name: Upload coverage
uses: codecov/codecov-action@v1.0.7
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/clover.xml
+36
View File
@@ -1,5 +1,41 @@
# Changelog
## 2.5.0 (2021/03/31)
* Bump y18n from 4.0.0 to 4.0.1 (#272)
* Bump @actions/http-client from 1.0.9 to 1.0.11 (#270)
* Enhance workflow (#271)
* Bump node-notifier from 8.0.0 to 8.0.1 (#263)
## 2.4.1 (2020/12/02)
* Do not overwrite GORELEASER_CURRENT_TAG if already declared (#260)
## 2.4.0 (2020/11/30)
* Set GORELEASER_CURRENT_TAG (#259)
* Container based developer flow (#258)
* Upload artifact example (#257)
* Bump @actions/tool-cache from 1.6.0 to 1.6.1 (#256)
## 2.3.0 (2020/11/06)
* Add install-only option for using goreleaser in user scripts (#252)
* Update deps
## 2.2.1 (2020/10/01)
* Fix CVE-2020-15228
## 2.2.0 (2020/08/27)
* Use GITHUB_REF to retrieve tag before checking the most recent tag (#238)
* Update deps
## 2.1.1 (2020/06/24)
* Fix workdir (#224)
## 2.1.0 (2020/06/15)
* Implement (optional) semver parsing of version (#213)
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019-2020 CrazyMax
Copyright (c) 2019-2021 CrazyMax
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+74 -15
View File
@@ -19,10 +19,13 @@ ___
* [Workflow](#workflow)
* [Run on new tag](#run-on-new-tag)
* [Signing](#signing)
* [Upload artifacts](#upload-artifacts)
* [Install Only](#install-only)
* [Customizing](#customizing)
* [inputs](#inputs)
* [environment variables](#environment-variables)
* [Limitation](#limitation)
* [Development](#development)
* [License](#license)
## Usage
@@ -49,15 +52,19 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.15
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
```
> **IMPORTANT**: note the `fetch-depth: 0` input in `Checkout` step. It is required for the changelog to work correctly.
@@ -97,10 +104,10 @@ If [signing is enabled](https://goreleaser.com/customization/#Signing) in your G
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
uses: crazy-max/ghaction-import-gpg@v3
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
@@ -120,17 +127,55 @@ signs:
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
```
### Upload artifacts
For some events like pull request or schedule you might want to store the artifacts somewhere for testing
purpose. You can do that with the [actions/upload-artifact](https://github.com/actions/upload-artifact) action:
```yaml
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Upload assets
uses: actions/upload-artifact@v2
with:
name: myapp
path: dist/*
```
### Install Only
```yaml
steps:
-
name: Install GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true
-
name: Show GoReleaser version
run: goreleaser -v
```
## Customizing
### inputs
Following inputs can be used as `step.with` keys
| Name | Type | Default | Description |
|------------------|---------|-----------|-------------------------------------------|
| `version`**¹** | String | `latest` | GoReleaser version |
| `args` | String | | Arguments to pass to GoReleaser |
| `workdir` | String | `.` | Working directory (below repository root) |
| Name | Type | Default | Description |
|------------------|---------|--------------|------------------------------------------------------------------|
| `distribution` | String | `goreleaser` | GoReleaser distribution, either `goreleaser` or `goreleaser-pro` |
| `version`**¹** | String | `latest` | GoReleaser version |
| `args` | String | | Arguments to pass to GoReleaser |
| `workdir` | String | `.` | Working directory (below repository root) |
| `install-only` | Bool | `false` | Just install GoReleaser |
> **¹** Can be a fixed version like `v0.117.0` or a max satisfying semver one like `~> 0.132`. In this case this will return `v0.132.1`.
@@ -138,17 +183,18 @@ Following inputs can be used as `step.with` keys
Following environment variables can be used as `step.env` keys
| Name | Description |
|----------------|---------------------------------------|
| `GITHUB_TOKEN` | [GITHUB_TOKEN](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) as provided by `secrets` |
| Name | Description |
|------------------|---------------------------------------|
| `GITHUB_TOKEN` | [GITHUB_TOKEN](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) as provided by `secrets` |
| `GORELEASER_KEY` | Your [GoReleaser Pro](https://goreleaser.com/pro) License Key, in case you are using the `goreleaser-pro` distribution |
## Limitation
`GITHUB_TOKEN` permissions [are limited to the repository](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret)
that contains your workflow.
that contains your workflow.
If you need to push the homebrew tap to another repository, you must therefore create a custom [Personal Access Token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
with `repo` permissions and [add it as a secret in the repository](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets). If you create a
with `repo` permissions and [add it as a secret in the repository](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets). If you create a
secret named `GH_PAT`, the step will look like this:
```yaml
@@ -162,6 +208,19 @@ secret named `GH_PAT`, the step will look like this:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
```
## Development
```
# format code and build javascript artifacts
docker buildx bake pre-checkin
# validate all code has correctly formatted and built
docker buildx bake validate
# run tests
docker buildx bake test
```
## License
MIT. See `LICENSE` for more details.
+16 -1
View File
@@ -1,15 +1,30 @@
import * as git from '../src/git';
describe('git', () => {
it('returns git tag', async () => {
it('returns git tag through describe', async () => {
process.env.GITHUB_SHA = '309312125ed7a32fcd48f3a1e24dcafe669c186a';
const tag: string = await git.getTag();
console.log(`tag: ${tag}`);
expect(tag).not.toEqual('');
});
it('returns git tag through GITHUB_SHA', async () => {
process.env.GITHUB_SHA = '6e37040623d14330555c7be1603a9182cf92d32a';
const tag: string = await git.getTag();
console.log(`tag: ${tag}`);
expect(tag).toEqual('v1');
});
it('returns git tag through GITHUB_REF', async () => {
process.env.GITHUB_REF = 'refs/tags/v2.2.1';
const tag: string = await git.getTag();
console.log(`tag: ${tag}`);
expect(tag).toEqual('v2.2.1');
});
it('checks if tag is dirty', async () => {
expect(await git.isTagDirty('v1.3.1')).toBe(true);
});
it('returns short commit', async () => {
const commit: string = await git.getShortCommit();
console.log(`commit: ${commit}`);
expect(commit).not.toEqual('');
});
});
+18 -3
View File
@@ -2,18 +2,33 @@ import * as github from '../src/github';
describe('github', () => {
it('returns latest GoReleaser GitHub release', async () => {
const release = await github.getRelease('latest');
const release = await github.getRelease('goreleaser', 'latest');
expect(release).not.toBeNull();
expect(release?.tag_name).not.toEqual('');
});
it('returns v0.117.0 GoReleaser GitHub release', async () => {
const release = await github.getRelease('v0.117.0');
const release = await github.getRelease('goreleaser', 'v0.117.0');
expect(release).not.toBeNull();
expect(release?.tag_name).toEqual('v0.117.0');
});
it('returns v0.132.1 GoReleaser GitHub release', async () => {
const release = await github.getRelease('~> 0.132');
const release = await github.getRelease('goreleaser', '~> 0.132');
expect(release).not.toBeNull();
expect(release?.tag_name).toEqual('v0.132.1');
});
it('returns latest GoReleaser Pro GitHub release', async () => {
const release = await github.getRelease('goreleaser-pro', 'latest');
expect(release).not.toBeNull();
expect(release?.tag_name).not.toEqual('');
});
it('returns v0.166.0-pro GoReleaser Pro GitHub release', async () => {
const release = await github.getRelease('goreleaser-pro', 'v0.166.0-pro');
expect(release).not.toBeNull();
expect(release?.tag_name).toEqual('v0.166.0-pro');
});
it('returns v0.166.0-pro GoReleaser Pro GitHub release when using semver', async () => {
const release = await github.getRelease('goreleaser-pro', '~> 0.166');
expect(release).not.toBeNull();
expect(release?.tag_name).toEqual('v0.166.0-pro');
});
});
+12 -2
View File
@@ -3,12 +3,22 @@ import * as installer from '../src/installer';
describe('installer', () => {
it('acquires v0.117.0 version of GoReleaser', async () => {
const goreleaser = await installer.getGoReleaser('v0.117.0');
const goreleaser = await installer.getGoReleaser('goreleaser', 'v0.117.0');
expect(fs.existsSync(goreleaser)).toBe(true);
}, 100000);
it('acquires latest version of GoReleaser', async () => {
const goreleaser = await installer.getGoReleaser('latest');
const goreleaser = await installer.getGoReleaser('goreleaser', 'latest');
expect(fs.existsSync(goreleaser)).toBe(true);
}, 100000);
it('acquires v0.166.0-pro version of GoReleaser Pro', async () => {
const goreleaser = await installer.getGoReleaser('goreleaser-pro', 'v0.166.0-pro');
expect(fs.existsSync(goreleaser)).toBe(true);
}, 100000);
it('acquires latest version of GoReleaser Pro', async () => {
const goreleaser = await installer.getGoReleaser('goreleaser-pro', 'latest');
expect(fs.existsSync(goreleaser)).toBe(true);
}, 100000);
});
+10
View File
@@ -0,0 +1,10 @@
import * as pro from '../src/pro';
describe('pro', () => {
it('suffixes pro distribution', async () => {
expect(pro.suffix('goreleaser-pro')).toEqual('-pro');
});
it('does not suffix oss distribution', async () => {
expect(pro.suffix('goreleaser')).toEqual('');
});
});
+5 -1
View File
@@ -13,11 +13,15 @@ inputs:
required: false
args:
description: 'Arguments to pass to GoReleaser'
required: true
required: false
workdir:
description: 'Working directory (below repository root)'
default: '.'
required: false
install-only:
description: 'Just install GoReleaser'
default: 'false'
required: false
runs:
using: 'node12'
Generated Vendored
+4024 -3793
View File
File diff suppressed because it is too large Load Diff
+67
View File
@@ -0,0 +1,67 @@
variable "NODE_VERSION" {
default = "12"
}
target "node-version" {
args = {
NODE_VERSION = NODE_VERSION
}
}
group "default" {
targets = ["build"]
}
group "pre-checkin" {
targets = ["vendor-update", "format", "build"]
}
group "validate" {
targets = ["format-validate", "build-validate", "vendor-validate"]
}
target "build" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "build-update"
output = ["."]
}
target "build-validate" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "build-validate"
}
target "format" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "format-update"
output = ["."]
}
target "format-validate" {
inherits = ["node-version"]
dockerfile = "./hack/build.Dockerfile"
target = "format-validate"
}
target "vendor-update" {
inherits = ["node-version"]
dockerfile = "./hack/vendor.Dockerfile"
target = "update"
output = ["."]
}
target "vendor-validate" {
inherits = ["node-version"]
dockerfile = "./hack/vendor.Dockerfile"
target = "validate"
}
target "test" {
inherits = ["node-version"]
dockerfile = "./hack/test.Dockerfile"
target = "test-coverage"
output = ["./coverage"]
}
+42
View File
@@ -0,0 +1,42 @@
# syntax=docker/dockerfile:1.2
ARG NODE_VERSION
FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache cpio findutils git
WORKDIR /src
FROM base AS deps
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn install
FROM deps AS build
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn run build && mkdir /out && cp -Rf dist /out/
FROM scratch AS build-update
COPY --from=build /out /
FROM build AS build-validate
RUN --mount=type=bind,target=.,rw \
git add -A && cp -rf /out/* .; \
if [ -n "$(git status --porcelain -- dist)" ]; then \
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'; \
git status --porcelain -- dist; \
exit 1; \
fi
FROM deps AS format
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn run format \
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' | cpio -pdm /out
FROM scratch AS format-update
COPY --from=format /out /
FROM deps AS format-validate
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn run format-check \
+21
View File
@@ -0,0 +1,21 @@
# syntax=docker/dockerfile:1.2
ARG NODE_VERSION
FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache git
WORKDIR /src
FROM base AS deps
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn install
FROM deps AS test
ENV RUNNER_TEMP=/tmp/github_runner
ENV RUNNER_TOOL_CACHE=/tmp/github_tool_cache
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn run test --coverageDirectory=/tmp/coverage
FROM scratch AS test-coverage
COPY --from=test /tmp/coverage /
+23
View File
@@ -0,0 +1,23 @@
# syntax=docker/dockerfile:1.2
ARG NODE_VERSION
FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache git
WORKDIR /src
FROM base AS vendored
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/node_modules \
yarn install && mkdir /out && cp yarn.lock /out
FROM scratch AS update
COPY --from=vendored /out /
FROM vendored AS validate
RUN --mount=type=bind,target=.,rw \
git add -A && cp -rf /out/* .; \
if [ -n "$(git status --porcelain -- yarn.lock)" ]; then \
echo >&2 'ERROR: Vendor result differs. Please vendor your package with "docker buildx bake vendor-update"'; \
git status --porcelain -- yarn.lock; \
exit 1; \
fi
+1 -1
View File
@@ -8,7 +8,7 @@ module.exports = {
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
testTimeout: 10000,
testTimeout: 30000,
transform: {
'^.+\\.ts$': 'ts-jest'
},
+12 -12
View File
@@ -21,23 +21,23 @@
"author": "CrazyMax",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.4",
"@actions/core": "^1.3.0",
"@actions/exec": "^1.0.4",
"@actions/http-client": "^1.0.8",
"@actions/tool-cache": "^1.5.5"
"@actions/http-client": "^1.0.11",
"@actions/tool-cache": "^1.6.1"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"@types/node": "^14.0.13",
"@zeit/ncc": "^0.22.3",
"@types/jest": "^26.0.14",
"@types/node": "^14.11.2",
"@vercel/ncc": "^0.24.1",
"dotenv": "^8.2.0",
"jest": "^26.0.1",
"jest-circus": "^26.0.1",
"jest-runtime": "^26.0.1",
"prettier": "^2.0.5",
"jest": "^26.4.2",
"jest-circus": "^26.4.2",
"jest-runtime": "^26.4.2",
"prettier": "^2.1.2",
"tmp": "^0.2.1",
"ts-jest": "^26.1.0",
"typescript": "^3.9.5",
"ts-jest": "^26.4.1",
"typescript": "^4.0.3",
"typescript-formatter": "^7.2.2"
}
}
+14 -1
View File
@@ -11,7 +11,20 @@ const git = async (args: string[] = []): Promise<string> => {
export async function getTag(): Promise<string> {
try {
return await git(['describe', '--tags', '--abbrev=0']);
if ((process.env.GITHUB_REF || '').startsWith('refs/tags')) {
const tag = (process.env.GITHUB_REF || '').split('/').pop();
if (tag !== '' && tag !== undefined) {
return tag;
}
}
return await git(['tag', '--points-at', `${process.env.GITHUB_SHA}`, '--sort', '-version:creatordate']).then(
tags => {
if (tags.length == 0) {
return git(['describe', '--tags', '--abbrev=0']);
}
return tags.split('\n')[0];
}
);
} catch (err) {
return '';
}
+20 -8
View File
@@ -1,36 +1,44 @@
import * as httpm from '@actions/http-client';
import * as core from '@actions/core';
import * as semver from 'semver';
import * as pro from './pro';
export interface GitHubRelease {
id: number;
tag_name: string;
}
export const getRelease = async (version: string): Promise<GitHubRelease | null> => {
const resolvedVersion: string = (await resolveVersion(version)) || version;
const url: string = `https://github.com/goreleaser/goreleaser/releases/${resolvedVersion}`;
export const getRelease = async (distribution: string, version: string): Promise<GitHubRelease | null> => {
const resolvedVersion: string = (await resolveVersion(distribution, version)) || version;
const url: string = `https://github.com/goreleaser/${distribution}/releases/${resolvedVersion}`;
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
return (await http.getJson<GitHubRelease>(url)).result;
};
const resolveVersion = async (version: string): Promise<string | null> => {
const allTags: Array<string> | null = await getAllTags();
const resolveVersion = async (distribution: string, version: string): Promise<string | null> => {
const allTags: Array<string> | null = await getAllTags(distribution);
if (!allTags) {
throw new Error(`Cannot find GoReleaser tags`);
}
core.debug(`Found ${allTags.length} tags in total`);
return semver.maxSatisfying(allTags, version);
if (version === 'latest' || !pro.isPro(distribution)) {
return semver.maxSatisfying(allTags, version);
}
const cleanTags: Array<string> = allTags.map(tag => cleanTag(tag));
const cleanVersion: string = cleanTag(version);
return semver.maxSatisfying(cleanTags, cleanVersion) + pro.suffix(distribution);
};
interface GitHubTag {
tag_name: string;
}
const getAllTags = async (): Promise<Array<string>> => {
const getAllTags = async (distribution: string): Promise<Array<string>> => {
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
const url: string = `https://goreleaser.com/static/releases.json`;
const suffix: string = pro.suffix(distribution);
const url: string = `https://goreleaser.com/static/releases${suffix}.json`;
const getTags = http.getJson<Array<GitHubTag>>(url);
return getTags.then(response => {
@@ -41,3 +49,7 @@ const getAllTags = async (): Promise<Array<string>> => {
return response.result.map(obj => obj.tag_name);
});
};
const cleanTag = (tag: string): string => {
return tag.replace(/-pro$/, '');
};
+9 -6
View File
@@ -2,22 +2,24 @@ import * as os from 'os';
import * as path from 'path';
import * as util from 'util';
import * as github from './github';
import * as pro from './pro';
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
const osPlat: string = os.platform();
const osArch: string = os.arch();
export async function getGoReleaser(version: string): Promise<string> {
const release: github.GitHubRelease | null = await github.getRelease(version);
export async function getGoReleaser(distribution: string, version: string): Promise<string> {
const release: github.GitHubRelease | null = await github.getRelease(distribution, version);
if (!release) {
throw new Error(`Cannot find GoReleaser ${version} release`);
}
core.info(`✅ GoReleaser version found: ${release.tag_name}`);
const filename = getFilename();
const filename = getFilename(distribution);
const downloadUrl = util.format(
'https://github.com/goreleaser/goreleaser/releases/download/%s/%s',
'https://github.com/goreleaser/%s/releases/download/%s/%s',
distribution,
release.tag_name,
filename
);
@@ -44,9 +46,10 @@ export async function getGoReleaser(version: string): Promise<string> {
return exePath;
}
const getFilename = (): string => {
const getFilename = (distribution: string): string => {
const platform: string = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux';
const arch: string = osArch == 'x64' ? 'x86_64' : 'i386';
const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz';
return util.format('goreleaser_%s_%s.%s', platform, arch, ext);
const suffix: string = pro.suffix(distribution);
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext);
};
+21 -5
View File
@@ -2,23 +2,36 @@ import * as git from './git';
import * as installer from './installer';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import {dirname} from 'path';
async function run(): Promise<void> {
try {
const distribution = core.getInput('distribution') || 'goreleaser';
const version = core.getInput('version') || 'latest';
const args = core.getInput('args', {required: true});
const args = core.getInput('args');
const workdir = core.getInput('workdir') || '.';
const goreleaser = await installer.getGoReleaser(version);
const isInstallOnly = /^true$/i.test(core.getInput('install-only'));
const goreleaser = await installer.getGoReleaser(distribution, version);
core.info(`✅ GoReleaser installed successfully`);
const commit = await git.getShortCommit();
const tag = await git.getTag();
const isTagDirty = await git.isTagDirty(tag);
if (isInstallOnly) {
const goreleaserDir = dirname(goreleaser);
core.addPath(goreleaserDir);
core.debug(`Added ${goreleaserDir} to PATH`);
return;
} else if (!args) {
throw new Error('args input required');
}
if (workdir && workdir !== '.') {
core.info(`📂 Using ${workdir} as working directory...`);
process.chdir(workdir);
}
const commit = await git.getShortCommit();
const tag = await git.getTag();
const isTagDirty = await git.isTagDirty(tag);
let snapshot = '';
if (args.split(' ').indexOf('release') > -1) {
if (isTagDirty) {
@@ -32,6 +45,9 @@ async function run(): Promise<void> {
}
core.info('🏃 Running GoReleaser...');
if (!('GORELEASER_CURRENT_TAG' in process.env)) {
process.env.GORELEASER_CURRENT_TAG = tag;
}
await exec.exec(`${goreleaser} ${args}${snapshot}`);
} catch (error) {
core.setFailed(error.message);
+7
View File
@@ -0,0 +1,7 @@
export const suffix = (distribution: string): string => {
return isPro(distribution) ? '-pro' : '';
};
export const isPro = (distribution: string): boolean => {
return distribution === 'goreleaser-pro';
};
@@ -1,6 +1,5 @@
env:
- GO111MODULE=on
- GOPROXY=https://goproxy.io
before:
hooks:
@@ -26,10 +25,6 @@ archives:
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- CHANGELOG.md
checksum:
name_template: 'checksums.txt'
-5
View File
@@ -1,6 +1,5 @@
env:
- GO111MODULE=on
- GOPROXY=https://goproxy.io
before:
hooks:
@@ -26,10 +25,6 @@ archives:
format_overrides:
- goos: windows
format: zip
files:
- LICENSE
- README.md
- CHANGELOG.md
checksum:
name_template: 'checksums.txt'
+1 -1
View File
@@ -1,3 +1,3 @@
module github.com/goreleaser/goreleaser-action
go 1.14
go 1.15
View File
+2 -1
View File
@@ -3,7 +3,8 @@
"target": "es6",
"module": "commonjs",
"lib": [
"es6"
"es6",
"dom"
],
"newLine": "lf",
"outDir": "./lib",
+3840 -3756
View File
File diff suppressed because it is too large Load Diff