fix: gh action #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wails build | |
on: | |
push: | |
tags: | |
# Match any new tag | |
- '*' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build: | |
[ | |
{ platform: linux/amd64, os: ubuntu-latest }, | |
{ platform: windows/amd64, os: windows-latest }, | |
{ platform: darwin/universal, os: macos-latest }, | |
] | |
runs-on: ${{ matrix.build.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Get Wails | |
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
- name: Install Linux Wails deps | |
if: runner.os == 'Linux' | |
run: sudo apt-get update && sudo apt-get install libgtk-3-0 libwebkit2gtk-4.0-dev gcc-aarch64-linux-gnu zip | |
shell: bash | |
# Building step | |
- name: Build macOS App | |
if: runner.os == 'macOS' | |
run: wails build --platform ${{matrix.build.platform}} | |
shell: bash | |
- name: Build macOS zip file | |
if: runner.os == 'macOS' | |
shell: bash | |
run: ditto -c -k --keepParent ./build/bin/Secret\ Editor.app ./build/bin/SecretEditor_macOS_universal.zip | |
- name: Build Linux App | |
if: runner.os == 'Linux' | |
run: wails build --platform ${{matrix.build.platform}} -o SecretEditor | |
shell: bash | |
- name: Build linux zip file | |
if: runner.os == 'Linux' | |
shell: bash | |
run: zip ./build/bin/SecretEditor_linux_amd64.zip ./build/bin/SecretEditor | |
- name: Build Windows App | |
if: runner.os == 'Windows' | |
run: wails build --platform ${{matrix.build.platform}} -o SecretEditor.exe | |
shell: bash | |
- name: Build Windows zip file | |
if: runner.os == 'Windows' | |
working-directory: ./build/bin | |
run: Compress-Archive "SecretEditor.exe" "SecretEditor_windows_amd64.zip" | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
fail_on_unmatched_files: true | |
files: | | |
*/bin/*.zip |