Alpha Release v1 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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=amd64,386,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 Windows Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows | |
path: | | |
fyne-cross/bin/windows-amd64/ | |
fyne-cross/bin/windows-386/ | |
fyne-cross/bin/windows-arm64/ | |
- name: Rename exe file | |
run: | | |
mv fyne-cross/bin/windows-amd64/${{ env.APP_NAME }}.exe fyne-cross/bin/windows-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_amd64.exe | |
mv fyne-cross/bin/windows-386/${{ env.APP_NAME }}.exe fyne-cross/bin/windows-386/${{ env.APP_NAME }}_${{ github.ref_name }}_386.exe | |
mv fyne-cross/bin/windows-arm64/${{ env.APP_NAME }}.exe fyne-cross/bin/windows-arm64/${{ env.APP_NAME }}_${{ github.ref_name }}_arm64.exe | |
- name: Upload to Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
fyne-cross/bin/windows-amd64/${{ env.APP_NAME }}_${{ github.ref_name }}_amd64.exe | |
fyne-cross/bin/windows-386/${{ env.APP_NAME }}_${{ github.ref_name }}_386.exe | |
fyne-cross/bin/windows-arm64/${{ env.APP_NAME }}_${{ github.ref_name }}_arm64.exe | |
token: ${{ secrets.TOKEN }} | |