Skip to content

Merge branch 'develop' #24

Merge branch 'develop'

Merge branch 'develop' #24

Workflow file for this run

name: build
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: build-${{ github.ref }}
jobs:
package:
strategy:
matrix:
platform: [windows-latest, macos-latest]
go-version: [1.21]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
cache-dependency-path: 'frontend/package-lock.json'
# wails.jsonでフロントエンドのビルドおよびインストールコマンドを設定していない場合、ここで手動でフロントエンドをビルドする必要があるかもしれません。
- name: Get Wails
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Get NSIS
if: matrix.platform == 'windows-latest'
run: |
choco install nsis
- name: Build Wails app for macOS
if: matrix.platform == 'macos-latest'
run: |
wails build -platform darwin/universal -clean
- name: Build Wails app for Windows
if: matrix.platform == 'windows-latest'
run: |
wails build -nsis -clean
- name: Import codesign certs
if: matrix.platform == 'macos-latest'
uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.APPLE_CERT_DATA }}
p12-password: ${{ secrets.APPLE_CERT_PASSWORD }}
- name: Codesign app
if: matrix.platform == 'macos-latest'
run: |
codesign --deep --force -v -s "${{secrets.APPLE_SIGN_IDENTITY}}" -o runtime --timestamp build/bin/SIMAppletManager.app
- name: Create DMG
if: matrix.platform == 'macos-latest'
run: |
npm i -g create-dmg
mkdir -p build/dmg
create-dmg build/bin/SIMAppletManager.app --dmg-title=SIMAppletManager build/dmg/
mv build/dmg/*.dmg build/dmg/SIMAppletManager.dmg
- name: Notarize DMG
if: matrix.platform == 'macos-latest'
run: |
xcrun notarytool submit \
--team-id '${{ secrets.APPLE_TEAM_ID }}' \
--apple-id '${{ secrets.APPLE_USERNAME }}' \
--password "${{ secrets.APPLE_PASSWORD }}" \
--wait \
build/dmg/SIMAppletManager.dmg
- name: Staple DMG
if: matrix.platform == 'macos-latest'
run: |
DMG="$(ls build/dmg/)"
xcrun stapler staple build/dmg/SIMAppletManager.dmg
- name: upload artifacts macOS
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: sim-applet-manager-macos
path: build/dmg/*
- name: upload artifacts windows
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: sim-applet-manager-windows
path: build/bin/SIMAppletManager-amd64-installer.exe