File tree Expand file tree Collapse file tree 1 file changed +29
-5
lines changed Expand file tree Collapse file tree 1 file changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -2,19 +2,22 @@ name: build release
2
2
on : [push]
3
3
4
4
jobs :
5
- build-release :
5
+ build_release :
6
6
strategy :
7
7
matrix :
8
8
include :
9
9
- os : ubuntu-latest
10
10
bin : esdump-rs
11
11
target : x86_64-unknown-linux-gnu
12
+ suffix : tar.gz
12
13
- os : macOS-latest
13
14
bin : esdump-rs
14
- target : aarch64-apple-darwin
15
+ target : aarch64-apple-darwin.tar
16
+ suffix : tar.gz
15
17
- os : windows-latest
16
18
bin : esdump-rs.exe
17
19
target : x86_64-pc-windows-msvc
20
+ suffix : zip
18
21
name : cargo build
19
22
runs-on : ${{ matrix.os }}
20
23
steps :
@@ -25,10 +28,31 @@ jobs:
25
28
key : " release-lto"
26
29
- run : cargo build --target=${{ matrix.target }} --profile=release-lto
27
30
- run : mkdir ${{ matrix.target }}
28
- - run : cp target/${{ matrix.target }}/release-lto/${{ matrix.bin }} ${{ matrix.target }}/${{ matrix.bin }}
31
+ - run : |
32
+ if [[ "${{ matrix.os }}" == "windows-latest" ]]
33
+ then
34
+ 7z a ${{ matrix.target}}.${{ matrix.suffix }} target/${{ matrix.target }}/release-lto/${{ matrix.bin }}
35
+ else
36
+ tar czvf ${{ matrix.target}}.${{ matrix.suffix }} target/${{ matrix.target }}/release-lto/${{ matrix.bin }}
37
+ fi
29
38
- name : Upload build artifacts
30
39
uses : actions/upload-artifact@v4
31
40
with :
32
- name : ${{ matrix.target }}
33
- path : ${{ matrix.target }}
41
+ name : ${{ matrix.target}}.${{ matrix.suffix }}
42
+ path : ${{ matrix.target}}.${{ matrix.suffix }}
34
43
retention-days : 1
44
+ #
45
+ # create_release:
46
+ # name: Release
47
+ # runs-on: ubuntu-latest
48
+ # needs:
49
+ # - build_release
50
+ # steps:
51
+ # - uses: actions/download-artifact@v4
52
+ # - name: Publish
53
+ # uses: softprops/action-gh-release@v1
54
+ # with:
55
+ # draft: false
56
+ # files: |
57
+ # **/*.tar.gz
58
+ # **/*.zip
You can’t perform that action at this time.
0 commit comments