fix: gh action #7
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 | |
shell: bash | |
# Building step | |
- name: Build macOS App | |
if: runner.os == 'macOS' | |
run: wails build --platform ${{matrix.build.platform}} -o SecretEditor_${{matrix.build.platform}}.app | |
shell: bash | |
- name: Build .app zip file | |
if: runner.os == 'macOS' | |
shell: bash | |
run: ditto -c -k ./build/bin/SecretEditor_${{matrix.build.platform}}.app ./build/bin/SecretEditor_${{matrix.build.platform}}.app.zip | |
- name: Build Linux App | |
if: runner.os == 'Linux' | |
run: wails build --platform ${{matrix.build.platform}} -o SecretEditor_${{matrix.build.platform}} | |
shell: bash | |
- name: Build Windows App | |
if: runner.os == 'Windows' | |
run: wails build --platform ${{matrix.build.platform}} -o SecretEditor_${{matrix.build.platform}}.exe | |
shell: bash | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
fail_on_unmatched_files: true | |
files: | | |
*/bin/* |