2
0
mirror of https://github.com/Revertron/Alfis synced 2024-11-03 15:40:19 +00:00

Added building and publishing of ARMv7 binary

This commit is contained in:
Revertron 2021-03-19 12:51:20 +01:00 committed by GitHub
parent 8a19d02b1a
commit 9fac1dc6a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,11 +62,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: install libgtk-dev libwebkit2gtk-4.0
run: sudo apt update && sudo apt install libwebkit2gtk-4.0-dev
run: |
sudo apt update && sudo apt install libwebkit2gtk-4.0-dev
cargo install cross
if: contains(matrix.os, 'ubuntu')
- name: Build release binary
run: |
cargo build --release
- name: Build ARMv7 binary
run: cross build --release --no-default-features --target armv7-unknown-linux-gnueabihf
if: contains(matrix.os, 'ubuntu')
- name: win_arch
run: echo "BIN_ARCH=windows-amd64" >> $GITHUB_ENV
if: contains(matrix.os, 'windows')
@ -80,6 +85,8 @@ jobs:
run: |
echo "BIN_PATH=./target/release/alfis" >> $GITHUB_ENV
echo "ZIP_NAME=alfis-${{env.BIN_ARCH}}-v${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV
echo "BIN_ARM_PATH=./target/armv7-unknown-linux-gnueabihf/release/alfis" >> $GITHUB_ENV
echo "ZIP_ARM_NAME=alfis-armv7-v${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV
- name: Windows variables
if: contains(matrix.os, 'windows')
run: |
@ -90,6 +97,12 @@ jobs:
with:
files: ${{ env.BIN_PATH }} alfis.toml README.md LICENSE
dest: ${{ env.ZIP_NAME }}
- name: Packaging ARM
uses: papeloto/action-zip@v1
with:
files: ${{ env.BIN_ARM_PATH }} alfis.toml README.md LICENSE
dest: ${{ env.ZIP_ARM_NAME }}
if: contains(matrix.os, 'ubuntu')
- name: Upload binary
id: upload-binary
uses: actions/upload-release-asset@v1
@ -100,3 +113,13 @@ jobs:
asset_path: ${{ env.ZIP_NAME }}
asset_name: ${{ env.ZIP_NAME }}
asset_content_type: application/zip
- name: Upload ARM binary
id: upload-arm-binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.make_release.outputs.upload_url }}
asset_path: ${{ env.ZIP_ARM_NAME }}
asset_name: ${{ env.ZIP_ARM_NAME }}
asset_content_type: application/zip