Skip to content

Merge pull request #30 from xiaomakuaiz/feat-add-some-testcase #4

Merge pull request #30 from xiaomakuaiz/feat-add-some-testcase

Merge pull request #30 from xiaomakuaiz/feat-add-some-testcase #4

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 }}