Skip to content

test: macos arm64 build #1

test: macos arm64 build

test: macos arm64 build #1

name: Build for MacOS ARM64
on: push
jobs:
build:
runs-on: macos-11.0-arm64
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.20.2
- name: Go tidy
run: go mod tidy
- name: Install fyne
run: go env -w GOARCH=arm64 && go get fyne.io/fyne/v2/cmd/fyne && go install fyne.io/fyne/v2/cmd/fyne
- name: Package for MacOS
run: go env -w GOARCH=arm64 && fyne package --release -os darwin
- name: Compress
uses: a7ul/[email protected]
id: compress
with:
command: c
files: |
LICENSE
README.md
Fetch-Github-Hosts.app
outPath: fetch-github-hosts_${{ env.RELEASE_VERSION }}_macOS_arm64.tar.gz
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
append_body: true
files: fetch-github-hosts_${{ env.RELEASE_VERSION }}_macOS_arm64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}