From c3ea2be80926d85726ca173ab7a9ee560cc01931 Mon Sep 17 00:00:00 2001 From: superdooper86 Date: Thu, 7 May 2026 23:28:42 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20YAML=20syntax=20in=20stable=20workflow=20?= =?UTF-8?q?=E2=80=94=20indent=20Python,=20use=20env=20var=20for=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff0b1a0..ae0115c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,21 +66,24 @@ jobs: ../homebrew-tap/Casks/claudechecker.rb 2>/dev/null || true - name: Update README badge + env: + NEW_VERSION: ${{ steps.version.outputs.version }} run: | python3 -c " -content = open('README.md').read() -import re -content = re.sub(r'version-[0-9][^-]*-orange', 'version-${{ steps.version.outputs.version }}-orange', content) -lines = content.splitlines(keepends=True) -out = [] -for line in lines: - if '' in line: - continue - out.append(line) - if 'license-MIT-blue' in line: - out.append('\n') -open('README.md', 'w').writelines(out) -" + import os, re + v = os.environ['NEW_VERSION'] + content = open('README.md').read() + content = re.sub(r'version-[0-9][^-]*-orange', 'version-' + v + '-orange', content) + lines = content.splitlines(keepends=True) + out = [] + for line in lines: + if '' in line: + continue + out.append(line) + if 'license-MIT-blue' in line: + out.append('' + chr(10)) + open('README.md', 'w').writelines(out) + " - name: Commit version.json and README run: |