change release action #4
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: Build and Release | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
build: | |
environment: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Install Wails CLI | |
run: | | |
go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
- name: Build for Windows | |
run: | | |
wails build -platform windows | |
mv ./build/bin/fintrack.exe ./build/bin/fintrack-win.exe | |
- name: Build for macOS | |
run: | | |
wails build -platform darwin | |
mv ./build/bin/fintrack ./build/bin/fintrack-macos | |
- name: Build for Linux | |
run: | | |
wails build -platform linux | |
mv ./build/bin/fintrack ./build/bin/fintrack-linux | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
./build/bin/fintrack-win.exe | |
./build/bin/fintrack-macos | |
./build/bin/fintrack-linux | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Get Release ID | |
id: get_release_id | |
run: echo "::set-output name=release_id::$(echo ${{ steps.create_release.outputs.release_id }})" | |
- name: Get Release Tag | |
id: get_release_tag | |
run: echo "::set-output name=release_tag::$(echo ${{ steps.create_release.outputs.tag }})" |