Skip to content

Commit 9c17865

Browse files
committed
ci: allow backfilling existing tags
1 parent 7162599 commit 9c17865

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,29 @@ jobs:
1818
goreleaser:
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout (tag push)
22-
if: ${{ github.event_name != 'workflow_dispatch' }}
21+
- name: Checkout
2322
uses: actions/checkout@v4
2423
with:
2524
fetch-depth: 0
26-
- name: Checkout (manual tag)
27-
if: ${{ github.event_name == 'workflow_dispatch' }}
28-
uses: actions/checkout@v4
29-
with:
30-
fetch-depth: 0
31-
ref: ${{ inputs.tag }}
3225

3326
- name: Setup Go
3427
uses: actions/setup-go@v5
3528
with:
3629
go-version-file: go.mod
3730
cache: true
3831

32+
- name: Stash GoReleaser config
33+
run: cp .goreleaser.yaml /tmp/.goreleaser.yaml
34+
35+
- name: Checkout release tag
36+
if: ${{ github.event_name == 'workflow_dispatch' }}
37+
run: git checkout ${{ inputs.tag }}
38+
3939
- name: GoReleaser
4040
uses: goreleaser/goreleaser-action@v6
4141
with:
4242
distribution: goreleaser
4343
version: latest
44-
args: release --clean --config .goreleaser.yaml
44+
args: release --clean --config /tmp/.goreleaser.yaml
4545
env:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)