Update CI workflows and go modules #804
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 for MacOS Apple Silicon | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set env | |
| run: if grep -Fxq "devel" version.txt;then echo "GO2TV_VERSION=$(cat version.txt)";else echo "GO2TV_VERSION=v$(cat version.txt)";fi >> $GITHUB_ENV | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Install refyne | |
| run: go install github.com/alexballas/refyne/v2/cmd/fyne@latest | |
| - name: Update FyneApp.toml version | |
| run: sed -i '' "s/^Version.*/Version = \"$(echo ${{ env.GO2TV_VERSION }} | sed 's/^v//')\"/" cmd/go2tv/FyneApp.toml | |
| - name: Package (macOS) | |
| run: | | |
| cd cmd/go2tv | |
| sed -i '' "s/version = \"dev\"/version = \"$(echo ${{ env.GO2TV_VERSION }} | sed 's/^v//')\"/" go2tv.go | |
| CGO_CFLAGS="-mmacosx-version-min=12.3" CGO_LDFLAGS="-mmacosx-version-min=12.3" MACOSX_DEPLOYMENT_TARGET=12.3 GOARCH=arm64 fyne package --release --os darwin --icon ../../assets/go2tv-icon.png | |
| mv go2tv.app ../../ | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: go2tv_${{ env.GO2TV_VERSION }}_macOS_arm64 | |
| path: | | |
| LICENSE | |
| README.md | |
| go2tv.app/ | |
| retention-days: 2 |