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

Added more build targets

This commit is contained in:
Revertron 2021-03-19 14:04:41 +01:00 committed by GitHub
parent 7b22469b64
commit 4fadfa21c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,25 +66,39 @@ jobs:
sudo apt update && sudo apt install libwebkit2gtk-4.0-dev
cargo install cross
if: contains(matrix.os, 'ubuntu')
- name: Build release binary
- name: Build release binaries
run: |
cargo build --release
cargo build --release --no-default-features --target-dir nogui
- name: Build Windows release binaries with Edge
if: contains(matrix.os, 'windows')
run: |
cargo build --release --features "edge" --target-dir edge
- 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
run: |
echo "BIN_ARCH=windows-amd64" >> $GITHUB_ENV
echo "BIN_ARCH_NOGUI=windows-amd64-nogui" >> $GITHUB_ENV
echo "BIN_ARCH_EDGE=windows-amd64-edge" >> $GITHUB_ENV
if: contains(matrix.os, 'windows')
- name: lin_arch
run: echo "BIN_ARCH=linux-amd64" >> $GITHUB_ENV
run: |
echo "BIN_ARCH=linux-amd64" >> $GITHUB_ENV
echo "BIN_ARCH_NOGUI=linux-amd64-nogui" >> $GITHUB_ENV
if: contains(matrix.os, 'ubuntu')
- name: mac_arch
run: echo "BIN_ARCH=darwin-amd64" >> $GITHUB_ENV
run: |
echo "BIN_ARCH=darwin-amd64" >> $GITHUB_ENV
echo "BIN_ARCH_NOGUI=darwin-amd64-nogui" >> $GITHUB_ENV
if: contains(matrix.os, 'mac')
- name: Fill variables
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_PATH_NOGUI=./nogui/release/alfis" >> $GITHUB_ENV
echo "ZIP_NAME_NOGUI=alfis-${{env.BIN_ARCH}}-v${{ needs.get_version.outputs.project_version }}-nogui.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
@ -92,11 +106,26 @@ jobs:
run: |
echo "BIN_PATH=target/release/alfis.exe" >> $GITHUB_ENV
echo "ZIP_NAME=alfis-${{env.BIN_ARCH}}-v${{ needs.get_version.outputs.project_version }}.zip" >> $GITHUB_ENV
echo "BIN_PATH_NOGUI=nogui/release/alfis.exe" >> $GITHUB_ENV
echo "ZIP_NAME_NOGUI=alfis-${{env.BIN_ARCH}}-v${{ needs.get_version.outputs.project_version }}-nogui.zip" >> $GITHUB_ENV
echo "BIN_PATH_EDGE=edge/release/alfis.exe" >> $GITHUB_ENV
echo "ZIP_NAME_EDGE=alfis-${{env.BIN_ARCH}}-v${{ needs.get_version.outputs.project_version }}-edge.zip" >> $GITHUB_ENV
- name: Packaging
uses: papeloto/action-zip@v1
with:
files: ${{ env.BIN_PATH }} alfis.toml README.md LICENSE
dest: ${{ env.ZIP_NAME }}
- name: Packaging no GUI
uses: papeloto/action-zip@v1
with:
files: ${{ env.BIN_PATH_NOGUI }} alfis.toml README.md LICENSE
dest: ${{ env.ZIP_NAME_NOGUI }}
- name: Packaging Edge binary
if: contains(matrix.os, 'windows')
uses: papeloto/action-zip@v1
with:
files: ${{ env.BIN_PATH_EDGE }} alfis.toml README.md LICENSE
dest: ${{ env.ZIP_NAME_EDGE }}
- name: Packaging ARM
uses: papeloto/action-zip@v1
with:
@ -113,6 +142,27 @@ jobs:
asset_path: ${{ env.ZIP_NAME }}
asset_name: ${{ env.ZIP_NAME }}
asset_content_type: application/zip
- name: Upload no GUI binary
id: upload-nogui-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_NAME_NOGUI }}
asset_name: ${{ env.ZIP_NAME_NOGUI }}
asset_content_type: application/zip
- name: Upload Edge binary
if: contains(matrix.os, 'windows')
id: upload-edge-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_NAME_EDGE }}
asset_name: ${{ env.ZIP_NAME_EDGE }}
asset_content_type: application/zip
- name: Upload ARM binary
id: upload-arm-binary
if: contains(matrix.os, 'ubuntu')