Skip to content

Commit e155f97

Browse files
committed
Try compressing the releases
1 parent 1436ab6 commit e155f97

File tree

1 file changed

+29
-5
lines changed

1 file changed

+29
-5
lines changed

.github/workflows/release.yaml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ name: build release
22
on: [push]
33

44
jobs:
5-
build-release:
5+
build_release:
66
strategy:
77
matrix:
88
include:
99
- os: ubuntu-latest
1010
bin: esdump-rs
1111
target: x86_64-unknown-linux-gnu
12+
suffix: tar.gz
1213
- os: macOS-latest
1314
bin: esdump-rs
14-
target: aarch64-apple-darwin
15+
target: aarch64-apple-darwin.tar
16+
suffix: tar.gz
1517
- os: windows-latest
1618
bin: esdump-rs.exe
1719
target: x86_64-pc-windows-msvc
20+
suffix: zip
1821
name: cargo build
1922
runs-on: ${{ matrix.os }}
2023
steps:
@@ -25,10 +28,31 @@ jobs:
2528
key: "release-lto"
2629
- run: cargo build --target=${{ matrix.target }} --profile=release-lto
2730
- 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
2938
- name: Upload build artifacts
3039
uses: actions/upload-artifact@v4
3140
with:
32-
name: ${{ matrix.target }}
33-
path: ${{ matrix.target }}
41+
name: ${{ matrix.target}}.${{ matrix.suffix }}
42+
path: ${{ matrix.target}}.${{ matrix.suffix }}
3443
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

0 commit comments

Comments
 (0)