-
Notifications
You must be signed in to change notification settings - Fork 90
55 lines (45 loc) · 1.68 KB
/
release-gui-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
54
55
name: release blazehttp macos gui
permissions:
contents: write
on:
push:
tags:
- 'v*'
jobs:
macos-gui-releaser:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.22'
- name: Set up fyne
run: go install fyne.io/fyne/v2/cmd/fyne@latest
- name: build macos
run: |
GOARCH=amd64 fyne package --appID com.chaitin.blazehttp --name blazehttp_amd64 --src ./gui/ --os darwin -icon ../Icon.png
GOARCH=arm64 fyne package --appID com.chaitin.blazehttp --name blazehttp_arm64 --src ./gui/ --os darwin -icon ../Icon.png
- name: Normalise version tag
id: normalise_version
shell: bash
run: |
version=$(echo ${{ github.ref_name }} | sed -e 's/v//g')
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Normalise artifact name
id: normalise_artifact_name
shell: bash
run: |
tar -cvzf blazehttp_${{ steps.normalise_version.outputs.version }}_darwin_amd64_gui.tar.gz blazehttp_amd64.app
tar -cvzf blazehttp_${{ steps.normalise_version.outputs.version }}_darwin_arm64_gui.tar.gz blazehttp_arm64.app
- name: release gui
uses: softprops/action-gh-release@v1
with:
if: startsWith(github.ref, 'refs/tags/')
files: |
./blazehttp_${{ steps.normalise_version.outputs.version }}_darwin_amd64_gui.tar.gz
./blazehttp_${{ steps.normalise_version.outputs.version }}_darwin_arm64_gui.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}