Bump version #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-package | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
build-linux: | |
name: Build for Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/[email protected] | |
with: | |
crate: cargo-deb | |
use-tool-cache: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: deb | |
args: -- --all-features | |
- run: xz -kfS "_${GITHUB_REF#*/v}_linux_amd64.bin.xz" target/release/moproxy | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: target/debian/*.deb,target/release/*.bin.xz | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
build-windows: | |
name: Build for Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --all-features | |
- run: xz -kf target/release/moproxy.exe > "moproxy_${GITHUB_REF#*/v}_windows_amd64.exe.xz" | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: target/release/*.exe.xz | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
build-linux-cross: | |
name: Cross-build for various on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --target x86_64-unknown-linux-musl --release | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --target armv7-unknown-linux-gnueabihf --release | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --target aarch64-linux-android --release | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --target mips-unknown-linux-musl --release | |
- run: xz -kfS "_${GITHUB_REF#*/v}_linux_x86_64_musl.bin.xz" target/x86_64-unknown-linux-musl/release/moproxy | |
- run: xz -kfS "_${GITHUB_REF#*/v}_linux_armv7_gnueabihf.bin.xz" target/armv7-unknown-linux-gnueabihf/release/moproxy | |
- run: xz -kfS "_${GITHUB_REF#*/v}_linux_aarch64_android.bin.xz" target/aarch64-linux-android/release/moproxy | |
- run: xz -kfS "_${GITHUB_REF#*/v}_linux_mips_musl.bin.xz" target/mips-unknown-linux-musl/release/moproxy | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "target/**/*.bin.xz" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |