fix: checkout main before updating version-windows-beta.json

This commit is contained in:
SuperDooper
2026-05-08 12:20:22 +02:00
parent 7a74e19a20
commit 12ce671205
+15 -15
View File
@@ -27,11 +27,11 @@ jobs:
- 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 }} \
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
@@ -45,27 +45,27 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
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 }}')"
--notes "$notes"
- name: Update version-windows-beta.json
- name: Update version-windows-beta.json on main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin main
git checkout main
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
git push origin main