ci: add Windows beta release workflow

This commit is contained in:
SuperDooper
2026-05-08 12:16:03 +02:00
parent a3ce649946
commit 00bd5884db
@@ -0,0 +1,71 @@
name: Release Windows Beta
on:
push:
tags:
- 'win-v*-beta*'
jobs:
release-windows-beta:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Get version from tag
id: version
shell: bash
run: echo "version=${GITHUB_REF_NAME#win-v}" >> $GITHUB_OUTPUT
- name: Publish
run: |
dotnet publish windows/ClaudeCheckerWindows.csproj \
-c Release -r win-x64 \
--self-contained true \
-p:PublishSingleFile=true \
-p:Version=${{ steps.version.outputs.version }} \
-o publish
- name: Zip
shell: pwsh
run: |
Copy-Item -Recurse windows/Assets publish/Assets
Compress-Archive -Path publish/* -DestinationPath ClaudeChecker-Windows.zip
- name: Create GitHub pre-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
gh release create "$GITHUB_REF_NAME" ClaudeChecker-Windows.zip \
--title "$GITHUB_REF_NAME" \
--prerelease \
--notes "$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo 'Windows beta ${{ steps.version.outputs.version }}')"
- name: Update version-windows-beta.json
shell: bash
run: |
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
jq -n \
--arg version "${{ steps.version.outputs.version }}" \
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Windows.zip" \
--arg notes "$notes" \
'{version: $version, url: $url, notes: $notes}' > version-windows-beta.json
- name: Commit version-windows-beta.json
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add version-windows-beta.json
git commit -m "Windows beta release ${{ github.ref_name }}"
git pull --rebase origin main
git push origin HEAD:main