chore: disable broken auto-bump workflow (#414)
bump-plugin-version.yml has been failing on every merge to main since today's security + plugin-packaging work, because it tries to push directly to main and branch protection blocks it. It also conflicts with the manual version-management pattern we're currently using (manual bumps in PRs like #409 for 3.1.0). Renaming to .yml.disabled so GitHub Actions skips it. If we want auto-bumps later, the workflow needs to open a PR instead of pushing directly, and coordinate with manual version bumps. Co-authored-by: milla-jovovich <noreply@github.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
name: Bump Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
bump-version:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Bump patch version
|
||||
run: |
|
||||
CURRENT=$(python3 -c "exec(open('mempalace/version.py').read()); print(__version__)")
|
||||
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
|
||||
PATCH=$((PATCH + 1))
|
||||
NEW="${MAJOR}.${MINOR}.${PATCH}"
|
||||
echo "__version__ = \"${NEW}\"" > mempalace/version.py
|
||||
# Prepend docstring
|
||||
sed -i '1i"""Single source of truth for the MemPalace package version."""\n' mempalace/version.py
|
||||
echo "version=$NEW" >> "$GITHUB_OUTPUT"
|
||||
id: version
|
||||
|
||||
- name: Sync plugin.json
|
||||
run: |
|
||||
jq --arg v "${{ steps.version.outputs.version }}" '.version = $v' .claude-plugin/plugin.json > tmp.json && mv tmp.json .claude-plugin/plugin.json
|
||||
|
||||
- name: Sync marketplace.json
|
||||
run: |
|
||||
jq --arg v "${{ steps.version.outputs.version }}" '.plugins[0].version = $v' .claude-plugin/marketplace.json > tmp.json && mv tmp.json .claude-plugin/marketplace.json
|
||||
|
||||
- name: Sync codex plugin.json
|
||||
run: |
|
||||
jq --arg v "${{ steps.version.outputs.version }}" '.version = $v' .codex-plugin/plugin.json > tmp.json && mv tmp.json .codex-plugin/plugin.json
|
||||
|
||||
- name: Sync pyproject.toml
|
||||
run: |
|
||||
sed -i "s/^version = \".*\"/version = \"${{ steps.version.outputs.version }}\"/" pyproject.toml
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add mempalace/version.py .claude-plugin/plugin.json .claude-plugin/marketplace.json .codex-plugin/plugin.json pyproject.toml
|
||||
if ! git diff --staged --quiet; then
|
||||
git commit -m "chore: bump version to ${{ steps.version.outputs.version }}"
|
||||
git push
|
||||
fi
|
||||
Reference in New Issue
Block a user