11name : Release
22
3+ permissions :
4+ contents : write
5+
36on :
4- release :
5- types : [created]
7+ push :
8+ tags :
9+ - " [0-9]+.*"
610
711jobs :
8- release :
9- name : release ${{ matrix.target }}
12+ create-release :
1013 runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ - uses : taiki-e/create-gh-release-action@v1
17+ with :
18+ title : " v$tag"
19+ # (optional) Path to changelog.
20+ changelog : CHANGELOG.md
21+ # (required) GitHub token for creating GitHub Releases.
22+ token : ${{ secrets.GITHUB_TOKEN }}
23+
24+ upload-assets :
25+ needs : create-release
1126 strategy :
12- fail-fast : false
1327 matrix :
1428 include :
15- - target : x86_64-pc-windows-gnu
16- archive : zip
17- - target : x86_64-unknown-linux-musl
18- archive : tar.gz
19- # NOTE: shunting mac_os for now...
20- # Ref: https://github.com/rust-build/rust-build.action/issues/91
21- # - target: x86_64-apple-darwin
22- # archive: zip
29+ - target : x86_64-unknown-linux-gnu
30+ os : ubuntu-latest
31+ - target : x86_64-apple-darwin
32+ os : macos-latest
33+ - target : x86_64-pc-windows-msvc
34+ os : windows-latest
35+ runs-on : ${{ matrix.os }}
2336 steps :
2437 - uses : actions/checkout@v4
25- - run : rm Cargo.lock
26- - name : Compile and release
27- uses : rust-build/rust-build.action@v1.4.5
28- env :
29- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ - uses : taiki-e/upload-rust-binary-action@v1
3039 with :
31- RUSTTARGET : ${{ matrix.target }}
32- ARCHIVE_TYPES : ${{ matrix.archive }}
33- TOOLCHAIN_VERSION : stable
40+ # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
41+ # Note that glob pattern is not supported yet.
42+ bin : xan
43+ # (optional) Target triple, default is host triple.
44+ # This is optional but it is recommended that this always be set to
45+ # clarify which target you are building for if macOS is included in
46+ # the matrix because GitHub Actions changed the default architecture
47+ # of macos-latest since macos-14.
48+ target : ${{ matrix.target }}
49+ # (optional) On which platform to distribute the `.tar.gz` file.
50+ # [default value: unix]
51+ # [possible values: all, unix, windows, none]
52+ tar : unix
53+ # (optional) On which platform to distribute the `.zip` file.
54+ # [default value: windows]
55+ # [possible values: all, unix, windows, none]
56+ zip : windows
57+ # (required) GitHub token for uploading assets to GitHub Releases.
58+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments