Skip to content

Linux Build

Linux Build #10

Workflow file for this run

name: Linux Build
on:
release:
types: [created]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.22'
- name: Set up Fyne Cross
run: go install github.com/fyne-io/fyne-cross@latest
- name: Build for Linux
run: fyne-cross linux -arch=amd64,arm64
- name: Read TOML and set env vars
run: |
APP_NAME=$(awk -F '=' '/Name/ {gsub(/"/, "", $2); print $2}' FyneApp.toml | xargs)
echo "APP_NAME=$APP_NAME" >> $GITHUB_ENV
- name: Upload Linux Artifact
uses: actions/upload-artifact@v2
with:
name: linux
path: fyne-cross/dist/linux-amd64/
- name: Rename tar.xz file
run: |
mv fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}.tar.xz fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_amd64.tar.xz
mv fyne-cross/dist/linux-arm64/${{ env.APP_NAME }}.tar.xz fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_arm64.tar.xz
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_amd64.tar.xz
fyne-cross/dist/linux-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_arm64.tar.xz
token: ${{ secrets.TOKEN }}