Skip to content

Commit 8d6c08a

Browse files
Fix release workflow
1 parent 8f4931b commit 8d6c08a

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,38 +46,45 @@ jobs:
4646
rustup component add llvm-tools-preview --toolchain stable
4747
rustup component add rust-std-${{ matrix.target }} --toolchain stable
4848
49+
- name: Set up target (aarch64-unknown-linux-*)
50+
if: ${{ startsWith(matrix.target, 'aarch64-unknown-linux-') }}
51+
run: sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu
52+
4953
- name: Set up target (*-musl)
5054
if: ${{ endsWith(matrix.target, '-musl') }}
5155
run: sudo apt update -y && sudo apt install -y musl-dev musl-tools
5256

5357
- name: Set up target (aarch64-unknown-linux-musl)
5458
if: ${{ matrix.target == 'aarch64-unknown-linux-musl' }}
5559
run: |
56-
sudo apt update -y && sudo apt install -y gcc-aarch64-linux-gnu
5760
echo CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=rust-lld >> $GITHUB_ENV
5861
echo CC=aarch64-linux-gnu-gcc >> $GITHUB_ENV
5962
63+
- name: Install dependenies (*-linux-*)
64+
if: ${{ contains(matrix.target, '-linux-') }}
65+
run: sudo apt update -y && sudo apt install -y libssl-dev
66+
6067
- name: Build
6168
run: cargo build --bins --locked --release --target ${{ matrix.target }}
6269

6370
- name: Archive (tar.gz)
64-
if: ${{ !contains(matrix.os, 'windows') }}
71+
if: ${{ !contains(matrix.target, '-windows-') }}
6572
run: tar czf ../../${{ matrix.package }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.package }}
6673
working-directory: target/${{ matrix.target }}/release
6774

6875
- name: Archive (zip)
69-
if: ${{ contains(matrix.os, 'windows') }}
76+
if: ${{ contains(matrix.target, '-windows-') }}
7077
run: 7z a ../../${{ matrix.package }}-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.package }}.exe
7178
working-directory: target/${{ matrix.target }}/release
7279

7380
- name: Upload release asset (tar.gz)
74-
if: ${{ !contains(matrix.os, 'windows') }}
81+
if: ${{ !contains(matrix.target, '-windows-') }}
7582
uses: softprops/action-gh-release@v2
7683
with:
77-
files: ${{ matrix.package }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
84+
files: target/${{ matrix.package }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
7885

7986
- name: Upload release asset (zip)
80-
if: ${{ contains(matrix.os, 'windows') }}
87+
if: ${{ contains(matrix.target, '-windows-') }}
8188
uses: softprops/action-gh-release@v2
8289
with:
83-
files: ${{ matrix.package }}-${{ github.ref_name }}-${{ matrix.target }}.zip
90+
files: target/${{ matrix.package }}-${{ github.ref_name }}-${{ matrix.target }}.zip

0 commit comments

Comments
 (0)