Skip to content

Add position drift monitoring and re-application for Linux #30

Add position drift monitoring and re-application for Linux

Add position drift monitoring and re-application for Linux #30

name: Build SimpleAI (Windows Only)
permissions:
contents: write
on:
push:
branches:
- "**" # prerelease builds on every push
tags:
- "v*" # full releases on version tags
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: false
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Wails
timeout-minutes: 15
env:
GOFLAGS: "-v"
GOTOOLCHAIN: "local"
run: go install -v github.com/wailsapp/wails/v2/cmd/wails@latest
- name: Build application
shell: pwsh
run: |
$VERSION = (Get-Content wails.json | ConvertFrom-Json).info.productVersion + ".PRE"
wails build -clean -ldflags "-X main.Version=$VERSION"
- name: Rename EXE
shell: pwsh
run: |
$VERSION = (Get-Content wails.json | ConvertFrom-Json).info.productVersion + ".PRE"
Rename-Item "build/bin/SimpleAI.exe" "SimpleAI-windows $VERSION.exe"
- name: Upload Prerelease EXE
uses: actions/upload-artifact@v4
with:
name: SimpleAI-windows
path: "build/bin/SimpleAI-windows *.exe"
- name: Publish into repo
if: github.ref_type == 'branch'
shell: pwsh
run: |
$VERSION = (Get-Content wails.json | ConvertFrom-Json).info.productVersion + ".PRE"
git config user.name "github-actions"
git config user.email "github-actions@github.com"
mkdir automated-prereleases -ErrorAction Ignore
Copy-Item "build/bin/SimpleAI-windows $VERSION.exe" automated-prereleases/
git add "automated-prereleases/SimpleAI-windows $VERSION.exe"
git commit -m "Update Windows prerelease $VERSION"
git pull --rebase --autostash
git push