Skip to content

Commit

Permalink
fix: current tag not taken into account (#329)
Browse files Browse the repository at this point in the history
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max and crazy-max committed Feb 28, 2022
1 parent c127c9b commit b953231
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -174,3 +174,25 @@ jobs:
with:
name: myapp
path: ./test/dist/*

current-tag:
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.16
-
name: GoReleaser
uses: ./
with:
args: release --skip-publish --rm-dist
workdir: ./test
env:
GORELEASER_CURRENT_TAG: v1.2.3
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main.ts
Expand Up @@ -58,7 +58,7 @@ async function run(): Promise<void> {

await exec.exec(`${bin} ${inputs.args}${snapshot}`, undefined, {
env: Object.assign({}, process.env, {
GORELEASER_CURRENT_TAG: tag || process.env.GORELEASER_CURRENT_TAG || ''
GORELEASER_CURRENT_TAG: process.env.GORELEASER_CURRENT_TAG || tag || ''
}) as {
[key: string]: string;
}
Expand Down

0 comments on commit b953231

Please sign in to comment.