Skip to content

Windows Build and Release #10

Windows Build and Release

Windows Build and Release #10

Workflow file for this run

name: Windows Build and Release
on:
release:
types: [created]
jobs:
build-windows:
name: Build Windows
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 Windows
run: fyne-cross windows -arch=*
- 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 Windows Artifact
uses: actions/upload-artifact@v2
with:
name: windows
path: |
fyne-cross/dist/windows-amd64/
fyne-cross/dist/windows-386/
fyne-cross/dist/windows-arm64/
- name: Rename exe file
run: |
mv fyne-cross/dist/windows-amd64/${{ env.APP_NAME }}.exe fyne-cross/dist/windows-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_amd64.exe
mv fyne-cross/dist/windows-386/${{ env.APP_NAME }}.exe fyne-cross/dist/windows-386/${{ env.APP_NAME }}_${{ github.ref_name }}_386.exe
mv fyne-cross/dist/windows-arm64/${{ env.APP_NAME }}.exe fyne-cross/dist/windows-arm64/${{ env.APP_NAME }}_${{ github.ref_name }}_arm64.exe
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
fyne-cross/dist/windows-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_amd64.exe
fyne-cross/dist/windows-386/${{ env.APP_NAME }}_${{ github.ref_name }}_386.exe
fyne-cross/dist/windows-arm64/${{ env.APP_NAME }}_${{ github.ref_name }}_arm64.exe
token: ${{ secrets.TOKEN }}