ci: auto version releases

This commit is contained in:
2025-10-20 01:49:04 +11:00
parent 041019206b
commit 6fc5116e0e
2 changed files with 93 additions and 3 deletions

View File

@@ -25,11 +25,22 @@ jobs:
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
- name: Calculate release version
id: version
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GH_TOKEN != '' && secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$version = node scripts/ci/update-version.js
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
"version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
github_token: ${{ secrets.GH_TOKEN != '' && secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
args: --win --x64 --publish always
env:
GH_TOKEN: ${{ secrets.GH_TOKEN != '' && secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GH_TOKEN != '' && secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
release: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload installer artifact
@@ -39,4 +50,4 @@ jobs:
name: windows-installer
path: |
dist/**/*.exe
dist/**/*.blockmap
name: windows-installer-${{ steps.version.outputs.version }}