Compare commits

..
2 changed files with 33 additions and 21 deletions
+16 -10
View File
@@ -53,19 +53,25 @@ jobs:
- name: Update version-windows-beta.json on main - name: Update version-windows-beta.json on main
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
shell: bash shell: bash
run: | run: |
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}") notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows beta ${{ steps.version.outputs.version }}")
git config user.name "github-actions[bot]" content=$(jq -n \
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 version "${{ steps.version.outputs.version }}" \
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Windows.zip" \ --arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Windows.zip" \
--arg notes "$notes" \ --arg notes "$notes" \
'{version: $version, url: $url, notes: $notes}' > version-windows-beta.json '{version: $version, url: $url, notes: $notes}' | base64 -w0)
git add version-windows-beta.json sha=$(gh api "repos/${{ github.repository }}/contents/version-windows-beta.json?ref=main" --jq .sha 2>/dev/null || echo "")
git commit -m "Windows beta release ${{ github.ref_name }}" if [ -n "$sha" ]; then
git push origin main gh api --method PUT "repos/${{ github.repository }}/contents/version-windows-beta.json" \
--field "message=Windows beta release ${{ github.ref_name }}" \
--field "content=$content" \
--field "branch=main" \
--field "sha=$sha"
else
gh api --method PUT "repos/${{ github.repository }}/contents/version-windows-beta.json" \
--field "message=Windows beta release ${{ github.ref_name }}" \
--field "content=$content" \
--field "branch=main"
fi
+17 -11
View File
@@ -3,7 +3,7 @@ name: Release Windows
on: on:
push: push:
tags: tags:
- 'win-v*' - 'win-v[0-9]*'
- '!win-v*-*' - '!win-v*-*'
jobs: jobs:
@@ -53,19 +53,25 @@ jobs:
- name: Update version-windows.json on main - name: Update version-windows.json on main
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
shell: bash shell: bash
run: | run: |
notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows release ${{ steps.version.outputs.version }}") notes=$(cat windows/RELEASE_NOTES.md 2>/dev/null || echo "Windows release ${{ steps.version.outputs.version }}")
git config user.name "github-actions[bot]" content=$(jq -n \
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 version "${{ steps.version.outputs.version }}" \
--arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Windows.zip" \ --arg url "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/ClaudeChecker-Windows.zip" \
--arg notes "$notes" \ --arg notes "$notes" \
'{version: $version, url: $url, notes: $notes}' > version-windows.json '{version: $version, url: $url, notes: $notes}' | base64 -w0)
git add version-windows.json sha=$(gh api "repos/${{ github.repository }}/contents/version-windows.json?ref=main" --jq .sha 2>/dev/null || echo "")
git commit -m "Windows release ${{ github.ref_name }}" if [ -n "$sha" ]; then
git push origin main gh api --method PUT "repos/${{ github.repository }}/contents/version-windows.json" \
--field "message=Windows release ${{ github.ref_name }}" \
--field "content=$content" \
--field "branch=main" \
--field "sha=$sha"
else
gh api --method PUT "repos/${{ github.repository }}/contents/version-windows.json" \
--field "message=Windows release ${{ github.ref_name }}" \
--field "content=$content" \
--field "branch=main"
fi