Skip to content

Commit

Permalink
chore: update macos build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
terasum committed Sep 15, 2023
1 parent 7a217a9 commit 95d9ac3
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/build-macos-x86_64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build Medict Tasks
on:
push:
# tags:
# - v*
branches:
- master
- develop

jobs:
package:
strategy:
matrix:
go-version: [1.21.x]
platform: [macos-13.1]
runs-on: ${{ matrix.platform }}
steps:
- name: Get version tag (unix)
if: matrix.platform != 'windows-2019'
id: version
run: echo "::set-output name=tag::${GITHUB_REF/refs\/tags\//}"

- name: Inall pnpm
uses: pnpm/action-setup@v2
with:
version: 8.7.4
run_install: false

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Chechout
uses: actions/checkout@v2

- name: Install Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest

# darwin
- name: Build for darwin
if: matrix.platform == 'macos-13.3'
run: |
rm build/bin
wails build -f -ldflags "-X main.Version=${{ steps.version.outputs.tag }}"
- name: Create darwin disk image
if: matrix.platform == 'macos-13.3'
run: |
brew install create-dmg
ls -lh $PWD
create-dmg --volname "Medict" --volicon "build/assets/darwin/dmg_icon.icns" --background "build/assets/darwin/dmg_bg.png" --window-size 512 360 --icon-size 100 --icon "Medict.app" 100 185 --hide-extension "Medict.app" --app-drop-link 388 185 "Medict_${{ steps.version.outputs.tag }}_Darwin_x86_64.dmg" "build"
- name: Upload darwin disk image
if: matrix.platform == 'macos-13.3'
uses: actions/upload-artifact@v2
with:
name: Medict_${{ steps.version.outputs.tag }}_Darwin_x86_64.dmg
path: Medict_${{ steps.version.outputs.tag }}_Darwin_x86_64.dmg

0 comments on commit 95d9ac3

Please sign in to comment.