Wails build #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 | ||
description: Builds the app and creates a release | ||
Check failure on line 2 in .github/workflows/wails-build.yaml GitHub Actions / Wails buildInvalid workflow file
|
||
inputs: | ||
wails-version: | ||
description: The version of Wails to use | ||
required: true | ||
default: "2.6.0" | ||
node-version: | ||
description: The version of Node.js to use | ||
required: true | ||
default: "20.10.0" | ||
go-version: | ||
description: The version of Go to use | ||
required: true | ||
default: "1.21.3" | ||
artifact-name: | ||
description: The name of the artifact to upload | ||
required: true | ||
default: "Steam Auto Shutdown.exe" | ||
build-output-name: | ||
description: The name of the output file | ||
required: true | ||
default: "SteamAutoShutdown.exe" | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
runs-on: windows-latest | ||
outputs: | ||
version: ${{ steps.extract_version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- name: Set up Git | ||
run: git config --global user.email "[email protected]" && git config --global user.name "GitHub Actions" | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Extract Version | ||
id: extract_version | ||
shell: bash | ||
run: | | ||
version=$(jq -r '.info.productVersion' ./wails.json) | ||
echo "Version extracted from wails.json: $version" | ||
echo "version=$version" >> "$GITHUB_OUTPUT" | ||
- name: Setup GoLang | ||
uses: actions/setup-go@v4 | ||
with: | ||
check-latest: true | ||
go-version: ${{ inputs.go-version }} | ||
- name: Install Wails | ||
run: go install github.com/wailsapp/wails/v2/cmd/wails@${{inputs.wails-version}} | ||
shell: bash | ||
- name: Build Windows App | ||
working-directory: . | ||
run: wails build --clean --platform windows/amd64 -o ${{ inputs.build-output-name }} | ||
shell: bash | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact-name }} | ||
path: ./build/bin/SteamAutoShutdown.exe | ||
- name: Create Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ./build/bin/SteamAutoShutdown.exe | ||
tag_name: v${{ needs.build.outputs.version }} |