Skip to content

Commit 1d04973

Browse files
update workflow release
1 parent 3108e8f commit 1d04973

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Release
22

3+
permissions:
4+
contents: write
5+
36
on:
47
push:
58
tags:
@@ -12,34 +15,36 @@ jobs:
1215
- uses: actions/checkout@v4
1316
- uses: taiki-e/create-gh-release-action@v1
1417
with:
15-
# (required)
18+
# (required) GitHub token for creating GitHub Releases.
1619
token: ${{ secrets.GITHUB_TOKEN }}
1720

1821
upload-assets:
1922
needs: create-release
2023
strategy:
2124
matrix:
2225
include:
23-
- target: x86_64-unknown-linux-gnu
26+
- target: aarch64-unknown-linux-gnu
2427
os: ubuntu-latest
25-
build-tool: cargo-zigbuild
26-
# cargo-zigbuild's glibc version suffix is also supported.
27-
- target: aarch64-unknown-linux-gnu.2.17
28-
os: ubuntu-latest
29-
build-tool: cargo-zigbuild
3028
- target: aarch64-apple-darwin
3129
os: macos-latest
32-
build-tool: cargo-zigbuild
30+
- target: x86_64-unknown-linux-gnu
31+
os: ubuntu-latest
32+
- target: x86_64-apple-darwin
33+
os: macos-latest
3334
runs-on: ${{ matrix.os }}
3435
steps:
3536
- uses: actions/checkout@v4
37+
- name: Install cross-compilation tools
38+
uses: taiki-e/setup-cross-toolchain-action@v1
39+
with:
40+
target: ${{ matrix.target }}
41+
if: startsWith(matrix.os, 'ubuntu')
3642
- uses: taiki-e/upload-rust-binary-action@v1
3743
with:
38-
# (required)
44+
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
45+
# Note that glob pattern is not supported yet.
3946
bin: snip
4047
# (optional) Target triple, default is host triple.
4148
target: ${{ matrix.target }}
42-
# (optional) Tool to build binaries (cargo, cross, or cargo-zigbuild)
43-
build-tool: ${{ matrix.build-tool }}
4449
# (required) GitHub token for uploading assets to GitHub Releases.
4550
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)