Skip to content

Commit

Permalink
test: macos arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Oct 10, 2023
1 parent 09b346a commit 777c8bc
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-macos-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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 }}

0 comments on commit 777c8bc

Please sign in to comment.