File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ release :
5
+ types : [ created ]
6
+
7
+ jobs :
8
+ release-build :
9
+ runs-on : ubuntu-latest
10
+ strategy :
11
+ matrix :
12
+ target :
13
+ - x86_64-unknown-linux-gnu
14
+ - aarch64-unknown-linux-gnu
15
+ arch :
16
+ - x86_64
17
+ - arm64
18
+ steps :
19
+ - uses : actions/checkout@v4
20
+ - uses : dtolnay/rust-toolchain@stable
21
+ with :
22
+ rust-version : stable
23
+ targets : ${{ matrix.target }}
24
+
25
+ - name : Build release
26
+ run : cargo build --release --target ${{ matrix.target }}
27
+
28
+ - name : Archive binary
29
+ run : |
30
+ BIN=graphsync
31
+ TAR=graphsync-${{ github.event.release.tag_name }}-${{ matrix.arch }}.tar.gz
32
+ mkdir out
33
+ cp target/${{ matrix.target }}/release/$BIN out/
34
+ tar czf $TAR -C out $BIN
35
+
36
+ - name : Upload Release Asset
37
+ uses : softprops/action-gh-release@v2
38
+ with :
39
+ tag_name : ${{ github.event.release.tag_name }}
40
+ name : graphsync-${{ matrix.arch }}.tar.gz
41
+ asset_path : graphsync-${{ github.event.release.tag_name }}-${{ matrix.arch }}.tar.gz
42
+ env :
43
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44
+ - uses : actions/upload-artifact@v4
45
+ if : failure()
46
+ with :
47
+ name : fallback-${{ matrix.arch }}
48
+ path : graphsync-${{ github.event.release.tag_name }}-${{ matrix.arch }}.tar.gz
You can’t perform that action at this time.
0 commit comments