1
+ name : Release
2
+
3
+ permissions :
4
+ contents : write
5
+
6
+ on :
7
+ push :
8
+ tags :
9
+ # Regex for a version number such as 0.2.1
10
+ - " [0-9]+.[0-9]+.[0-9]+"
11
+
12
+ jobs :
13
+ create-release :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/checkout@v4
17
+ - uses : taiki-e/create-gh-release-action@v1
18
+ with :
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
26
+ runs-on : ${{ matrix.os }}
27
+
28
+ strategy :
29
+ matrix :
30
+ # You can add more, for any target you'd like!
31
+ include :
32
+ - build : linux
33
+ os : ubuntu-latest
34
+ target : x86_64-unknown-linux-gnu
35
+
36
+ - build : macos_x86_64
37
+ os : macos-latest
38
+ target : x86_64-apple-darwin
39
+
40
+ - build : windows-gnu
41
+ os : ubuntu-latest
42
+ target : x86_64-pc-windows-gnu
43
+
44
+ steps :
45
+ - uses : actions/checkout@v4
46
+
47
+ - name : Rust Cache
48
+ uses : Swatinem/rust-cache@v2.7.3
49
+
50
+ - uses : taiki-e/upload-rust-binary-action@v1
51
+ with :
52
+ # (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
53
+ # Note that glob pattern is not supported yet.
54
+ bin : pippo
55
+ # (optional) Target triple, default is host triple.
56
+ # This is optional but it is recommended that this always be set to
57
+ # clarify which target you are building for if macOS is included in
58
+ # the matrix because GitHub Actions changed the default architecture
59
+ # of macos-latest since macos-14.
60
+ target : ${{ matrix.target }}
61
+ # (optional) On which platform to distribute the `.tar.gz` file.
62
+ # [default value: unix]
63
+ # [possible values: all, unix, windows, none]
64
+ tar : unix
65
+ # (optional) On which platform to distribute the `.zip` file.
66
+ # [default value: windows]
67
+ # [possible values: all, unix, windows, none]
68
+ zip : windows
69
+ # (required) GitHub token for uploading assets to GitHub Releases.
70
+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments