mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-07-09 20:37:30 +00:00
fix: current tag not taken into account (#329)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -174,3 +174,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: myapp
|
name: myapp
|
||||||
path: ./test/dist/*
|
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
|
||||||
|
|||||||
+1
-1
@@ -477,7 +477,7 @@ function run() {
|
|||||||
}
|
}
|
||||||
yield exec.exec(`${bin} ${inputs.args}${snapshot}`, undefined, {
|
yield exec.exec(`${bin} ${inputs.args}${snapshot}`, undefined, {
|
||||||
env: Object.assign({}, process.env, {
|
env: Object.assign({}, process.env, {
|
||||||
GORELEASER_CURRENT_TAG: tag || process.env.GORELEASER_CURRENT_TAG || ''
|
GORELEASER_CURRENT_TAG: process.env.GORELEASER_CURRENT_TAG || tag || ''
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
if (typeof yamlfile === 'string') {
|
if (typeof yamlfile === 'string') {
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ async function run(): Promise<void> {
|
|||||||
|
|
||||||
await exec.exec(`${bin} ${inputs.args}${snapshot}`, undefined, {
|
await exec.exec(`${bin} ${inputs.args}${snapshot}`, undefined, {
|
||||||
env: Object.assign({}, process.env, {
|
env: Object.assign({}, process.env, {
|
||||||
GORELEASER_CURRENT_TAG: tag || process.env.GORELEASER_CURRENT_TAG || ''
|
GORELEASER_CURRENT_TAG: process.env.GORELEASER_CURRENT_TAG || tag || ''
|
||||||
}) as {
|
}) as {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user