fix: current tag not taken into account (#329)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
c127c9be61
commit
b953231f81
|
@ -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
|
||||||
|
|
|
@ -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') {
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue