diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index ad525ed..5302217 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -7,7 +7,7 @@ on: jobs: build-linux: - name: Build for + name: Build for Linux runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -40,3 +40,32 @@ jobs: 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 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_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 +