diff --git a/.github/workflows/release-windows-beta.yml b/.github/workflows/release-windows-beta.yml index 1307821..0bf4639 100644 --- a/.github/workflows/release-windows-beta.yml +++ b/.github/workflows/release-windows-beta.yml @@ -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