Skip to content

Commit f9373a1

Browse files
authored
Merge pull request #426 from hatoo/update-release
Update Release CI
2 parents 789c8c3 + 7d4a984 commit f9373a1

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,40 @@ jobs:
1616
artifact_name: oha
1717
release_name: oha-linux-amd64
1818
target: x86_64-unknown-linux-musl
19+
additional_args: "--features vsock"
1920
- os: windows-latest
2021
artifact_name: oha.exe
2122
release_name: oha-windows-amd64.exe
2223
target: x86_64-pc-windows-msvc
24+
additional_args: ""
2325
- os: macos-latest
2426
artifact_name: oha
2527
release_name: oha-macos-amd64
2628
target: x86_64-apple-darwin
29+
additional_args: ""
2730
- os: ubuntu-latest
2831
artifact_name: oha
2932
release_name: oha-linux-arm64
3033
target: aarch64-unknown-linux-musl
34+
additional_args: "--features vsock"
3135
- os: macos-14
3236
artifact_name: oha
3337
release_name: oha-macos-arm64
3438
target: aarch64-apple-darwin
39+
additional_args: ""
3540

3641
steps:
37-
- uses: actions/checkout@v1
38-
- name: Install rust
39-
uses: actions-rs/toolchain@v1
42+
- uses: actions/checkout@v4
43+
- name: Install musl-tools on Linux
44+
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools
45+
if: contains(matrix.target, 'musl')
46+
- name: Build binary
47+
uses: houseabsolute/actions-rust-cross@v0
4048
with:
41-
toolchain: stable
42-
profile: minimal
43-
override: true
44-
target: ${{ matrix.target }}
45-
- name: Build target
46-
uses: actions-rs/cargo@v1
47-
with:
48-
use-cross: true
4949
command: build
50-
args: --release --target ${{ matrix.target }} --locked --no-default-features --features rustls
51-
- uses: svenstaro/upx-action@v2
52-
if: matrix.target != 'aarch64-unknown-linux-musl' && matrix.target != 'aarch64-apple-darwin'
53-
with:
54-
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
50+
target: ${{ matrix.target }}
51+
args: --release --target ${{ matrix.target }} --locked --no-default-features --features rustls ${{ matrix.additional_args }}
52+
strip: true
5553
- name: Upload binaries to release
5654
uses: svenstaro/upload-release-action@v1-release
5755
with:

0 commit comments

Comments
 (0)