mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-08-29 13:08:30 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
499c61b7c5 | ||
|
|
ddc7bc8b43 | ||
|
|
9c48726d5e | ||
|
|
d0f90f55ae | ||
|
|
f2a4c95ec7 | ||
|
|
3d57a20621 | ||
|
|
3f5ecc4e17 | ||
|
|
70364181ef | ||
|
|
7007251a74 | ||
|
|
c5a3850c06 | ||
|
|
4441f834e5 | ||
|
|
e8c391b2a4 | ||
|
|
608bdefa0e | ||
|
|
6389ff5bd2 | ||
|
|
9593cd0a20 | ||
|
|
d93a2cdf8c | ||
|
|
3c2d9ae011 | ||
|
|
2fc4e3ac51 |
@@ -28,7 +28,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2.3.2
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
@@ -49,8 +49,39 @@ jobs:
|
||||
version: ${{ matrix.version }}
|
||||
args: release --skip-publish --rm-dist
|
||||
|
||||
install-only:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- latest
|
||||
- v0.117.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.14
|
||||
-
|
||||
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:
|
||||
@@ -61,7 +92,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2.3.2
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
@@ -72,10 +103,10 @@ jobs:
|
||||
-
|
||||
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: ./
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2.3.2
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Install
|
||||
run: yarn install
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2.3.2
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
run: yarn run test
|
||||
-
|
||||
name: Upload coverage
|
||||
uses: codecov/codecov-action@v1.0.13
|
||||
uses: codecov/codecov-action@v1
|
||||
if: success()
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## 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)
|
||||
|
||||
@@ -19,6 +19,7 @@ ___
|
||||
* [Workflow](#workflow)
|
||||
* [Run on new tag](#run-on-new-tag)
|
||||
* [Signing](#signing)
|
||||
* [Install Only](#install-only)
|
||||
* [Customizing](#customizing)
|
||||
* [inputs](#inputs)
|
||||
* [environment variables](#environment-variables)
|
||||
@@ -97,10 +98,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,6 +121,20 @@ signs:
|
||||
args: ["--batch", "-u", "{{ .Env.GPG_FINGERPRINT }}", "--output", "${signature}", "--detach-sign", "${artifact}"]
|
||||
```
|
||||
|
||||
### 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
|
||||
@@ -131,6 +146,7 @@ Following inputs can be used as `step.with` keys
|
||||
| `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`.
|
||||
|
||||
|
||||
+5
-1
@@ -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'
|
||||
|
||||
+2688
-2609
File diff suppressed because it is too large
Load Diff
+11
-11
@@ -21,23 +21,23 @@
|
||||
"author": "CrazyMax",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.5",
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/exec": "^1.0.4",
|
||||
"@actions/http-client": "^1.0.8",
|
||||
"@actions/http-client": "^1.0.9",
|
||||
"@actions/tool-cache": "^1.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/node": "^14.0.13",
|
||||
"@vercel/ncc": "^0.23.0",
|
||||
"@types/jest": "^26.0.14",
|
||||
"@types/node": "^14.11.2",
|
||||
"@vercel/ncc": "^0.24.1",
|
||||
"dotenv": "^8.2.0",
|
||||
"jest": "^26.1.0",
|
||||
"jest-circus": "^26.1.0",
|
||||
"jest-runtime": "^26.1.0",
|
||||
"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.1",
|
||||
"typescript": "^3.9.5",
|
||||
"ts-jest": "^26.4.1",
|
||||
"typescript": "^4.0.3",
|
||||
"typescript-formatter": "^7.2.2"
|
||||
}
|
||||
}
|
||||
|
||||
+13
-1
@@ -2,13 +2,25 @@ 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 version = core.getInput('version') || 'latest';
|
||||
const args = core.getInput('args', {required: true});
|
||||
const args = core.getInput('args');
|
||||
const workdir = core.getInput('workdir') || '.';
|
||||
const isInstallOnly = /^true$/i.test(core.getInput('install-only'));
|
||||
const goreleaser = await installer.getGoReleaser(version);
|
||||
core.info(`✅ GoReleaser installed successfully`);
|
||||
|
||||
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...`);
|
||||
|
||||
+2
-1
@@ -3,7 +3,8 @@
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"newLine": "lf",
|
||||
"outDir": "./lib",
|
||||
|
||||
Reference in New Issue
Block a user