-
Notifications
You must be signed in to change notification settings - Fork 127
53 lines (44 loc) · 1.24 KB
/
build-macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build for MacOS
on:
push:
tags:
- v*
jobs:
build:
runs-on: macos-latest
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 get fyne.io/fyne/v2/cmd/fyne && go install fyne.io/fyne/v2/cmd/fyne
- name: Package for MacOS
run: 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_amd64.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_amd64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}