Skip to content

Commit b52cd03

Browse files
committed
GitHub Actions: Fix artifacts downloading
In `release.yml`, replace `actions/download-artifact` with `$ gh run download`. Root cause is unknown.
1 parent f1c554b commit b52cd03

2 files changed

Lines changed: 6 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
runs-on: ubuntu-latest
3030
needs: release-drafter
3131
permissions:
32-
# For actions/download-artifact
32+
# For $ gh run download
3333
actions: read
3434
# For GoReleaser
3535
contents: write
@@ -47,26 +47,10 @@ jobs:
4747
with:
4848
go-version: stable
4949

50-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
51-
with:
52-
name: php-matrix_linux_arm64
53-
path: out/linux_arm64
54-
run-id: ${{ inputs.run_id }}
55-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
56-
with:
57-
name: php-matrix_linux_amd64
58-
path: out/linux_amd64
59-
run-id: ${{ inputs.run_id }}
60-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
61-
with:
62-
name: php-matrix_darwin_arm64
63-
path: out/darwin_arm64
64-
run-id: ${{ inputs.run_id }}
65-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
66-
with:
67-
name: php-matrix_darwin_amd64
68-
path: out/darwin_amd64
69-
run-id: ${{ inputs.run_id }}
50+
- run: gh run download "${RUN_ID}" --dir out --pattern 'php-matrix_*'
51+
env:
52+
RUN_ID: ${{ inputs.run_id }}
53+
GH_TOKEN: ${{ github.token }}
7054

7155
- uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
7256
id: app-token

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ builds:
1616
hooks:
1717
# Overwrite the binary with the prebuilt one, which is what we actually want to release.
1818
post:
19-
- cmd: mv "out/{{ .Os }}_{{ .Arch }}/{{ .Name }}" "{{ .Path }}"
19+
- cmd: mv "out/{{ .Name }}_{{ .Os }}_{{ .Arch }}/{{ .Name }}" "{{ .Path }}"
2020

2121
nfpms:
2222
- vendor: Typist Tech Limited

0 commit comments

Comments
 (0)