Build Fyne Application #10
Workflow file for this run
This file contains hidden or 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: Build Fyne Application | |
| env: | |
| GOVERSION: "1.22" | |
| NAME: "GopherLetics" | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| package_linux: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GOVERSION }} | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install gcc libgl1-mesa-dev xorg-dev libfuse2 libasound2-dev | |
| - name: Install Fyne tool | |
| run: go install fyne.io/tools/cmd/fyne@latest | |
| - name: Package Fyne app | |
| run: | | |
| fyne package -os linux --release | |
| ls -R | |
| - name: Set version | |
| run: | | |
| VERSION=${{ github.ref_name }} | |
| echo "VERSION=${VERSION:1}" >> $GITHUB_ENV | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: GopherLetics.tar.xz | |
| asset_name: ${{ env.NAME }}-${{ env.VERSION }}-linux.tar.xz | |
| asset_content_type: application/x-xz | |
| package_windows: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: [] | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| path-type: inherit | |
| update: true | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GOVERSION }} | |
| - name: Install Dependencies | |
| run: > | |
| pacman -Syu && | |
| pacman --noconfirm -S git zip mingw-w64-x86_64-toolchain | |
| - name: Install Fyne tool | |
| run: go install fyne.io/tools/cmd/fyne@latest | |
| - name: Package | |
| run: fyne package -os windows --release --app-id com.gopherletics.app | |
| - name: Set version | |
| run: | | |
| VERSION=${{ github.ref_name }} | |
| echo "VERSION=${VERSION:1}" >> $GITHUB_ENV | |
| - name: ZIP package | |
| run: zip ${{ env.NAME }}-${{ env.VERSION }}-windows-x64.zip "${{ env.NAME }}.exe" | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: ${{ env.NAME }}-${{ env.VERSION }}-windows-x64.zip | |
| asset_name: ${{ env.NAME }}-${{ env.VERSION }}-windows-x64.zip | |
| asset_content_type: application/zip | |
| package_darwin_arm: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: macos-14 | |
| needs: [] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ env.GOVERSION }} | |
| - name: Install Fyne tool | |
| run: go install fyne.io/tools/cmd/fyne@latest | |
| - name: Package app bundles | |
| run: | | |
| fyne package -os darwin --release --app-id com.gopherletics.app | |
| ls -R | |
| - name: Set version | |
| run: | | |
| VERSION=${{ github.ref_name }} | |
| echo "VERSION=${VERSION:1}" >> $GITHUB_ENV | |
| - name: ZIP app bundle | |
| run: zip --symlinks -r ${{ env.NAME }}-${{ env.VERSION }}-darwin-arm64.zip "${{ env.NAME }}.app/" | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: ${{ env.NAME }}-${{ env.VERSION }}-darwin-arm64.zip | |
| asset_name: ${{ env.NAME }}-${{ env.VERSION }}-darwin-arm64.zip | |
| asset_content_type: application/zip | |
| package_darwin_intel: | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: macos-13 | |
| needs: [] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ env.GOVERSION }} | |
| - name: Install Fyne tool | |
| run: go install fyne.io/tools/cmd/fyne@latest | |
| - name: Package app bundles | |
| run: | | |
| fyne package -os darwin --release --app-id com.gopherletics.app | |
| ls -R | |
| - name: Set version | |
| run: | | |
| VERSION=${{ github.ref_name }} | |
| echo "VERSION=${VERSION:1}" >> $GITHUB_ENV | |
| - name: ZIP app bundle | |
| run: zip --symlinks -r ${{ env.NAME }}-${{ env.VERSION }}-darwin-intel64.zip "GopherLetics.app/" | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ github.event.release.upload_url }} | |
| asset_path: ${{ env.NAME }}-${{ env.VERSION }}-darwin-intel64.zip | |
| asset_name: ${{ env.NAME }}-${{ env.VERSION }}-darwin-intel64.zip | |
| asset_content_type: application/zip |