Revert workflow to git push now that ruleset is fixed

This commit is contained in:
SuperDooper
2026-05-08 17:09:27 +02:00
parent 7bc72e240b
commit d55bad01db
+14 -27
View File
@@ -58,6 +58,13 @@ jobs:
--arg notes "$notes" \ --arg notes "$notes" \
'{version: $version, url: $url, notes: $notes}' > version.json '{version: $version, url: $url, notes: $notes}' > version.json
- name: Update Homebrew cask
run: |
sed -i '' \
-e 's/version "[^"]*"/version "${{ steps.version.outputs.version }}"/' \
-e 's/sha256 "[^"]*"/sha256 "${{ steps.sha.outputs.sha256 }}"/' \
../homebrew-tap/Casks/claudechecker.rb 2>/dev/null || true
- name: Update README badge - name: Update README badge
env: env:
NEW_VERSION: ${{ steps.version.outputs.version }} NEW_VERSION: ${{ steps.version.outputs.version }}
@@ -78,34 +85,14 @@ jobs:
open('README.md', 'w').writelines(out) open('README.md', 'w').writelines(out)
" "
- name: Commit version.json and README via API - name: Commit version.json and README
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
python3 - <<'PYEOF' git config user.name "github-actions[bot]"
import base64, subprocess, os git config user.email "github-actions[bot]@users.noreply.github.com"
git add version.json README.md
repo = os.environ['GITHUB_REPOSITORY'] git commit -m "Release ${{ github.ref_name }}"
ref_name = os.environ['GITHUB_REF_NAME'] git pull --rebase origin main
msg = f'Release {ref_name}' git push origin HEAD:main
def api_put(path):
sha = subprocess.check_output(
['gh', 'api', f'repos/{repo}/contents/{path}', '--jq', '.sha'],
text=True
).strip()
content = base64.b64encode(open(path, 'rb').read()).decode()
subprocess.run([
'gh', 'api', '--method', 'PUT',
f'repos/{repo}/contents/{path}',
'-f', f'message={msg}',
'-f', f'content={content}',
'-f', f'sha={sha}',
], check=True)
api_put('version.json')
api_put('README.md')
PYEOF
- name: Update Homebrew tap - name: Update Homebrew tap
env: env: