Skip to content

Commit 5a57093

Browse files
committed
configure cargo-dist and add GitHub release workflow
1 parent 027e22c commit 5a57093

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,35 @@ jobs:
3737
toolchain: stable
3838
profile: minimal
3939
override: true
40+
- name: Install cross
41+
if: ${{ matrix.runner == 'ubuntu-latest' }}
42+
run: cargo install cross --locked
4043
- name: Add target
44+
shell: bash
4145
run: |
4246
rustup target add ${{ matrix.target }} || true
4347
- name: Build release
48+
shell: bash
4449
run: |
45-
cargo build --release --target ${{ matrix.target }}
50+
case "${{ matrix.target }}" in
51+
x86_64-unknown-linux-gnu|aarch64-unknown-linux-gnu)
52+
cross build --release --target ${{ matrix.target }}
53+
;;
54+
*)
55+
cargo build --release --target ${{ matrix.target }}
56+
;;
57+
esac
4658
- name: Archive artifact
4759
if: ${{ matrix.archive == 'tar.gz' }}
60+
shell: bash
4861
run: |
4962
ART="doora-${{ matrix.target }}"
5063
mkdir -p dist
5164
cp target/${{ matrix.target }}/release/doora dist/${ART}
5265
tar -czf dist/${ART}.tar.gz -C dist ${ART}
5366
- name: Zip artifact
5467
if: ${{ matrix.archive == 'zip' }}
68+
shell: bash
5569
run: |
5670
ART="doora-${{ matrix.target }}"
5771
mkdir -p dist

0 commit comments

Comments
 (0)