From 4e47c4c5c6a330b6e247dcf64829a8798f9436ea Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Mon, 1 Jun 2026 13:37:40 -0400 Subject: [PATCH 1/2] chore: apply plugin version discipline --- .github/workflows/release.yml | 2 + .github/workflows/sync-plugin-version.yml | 59 ----------------------- plugin.json | 2 +- 3 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/sync-plugin-version.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7346c35..4452a82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,6 +49,8 @@ jobs: exit 0 fi "${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" . + - name: Verify shipped plugin.json carries tag (post-build) + run: '"${{ runner.temp }}/wfctl-bin/wfctl" plugin validate-contract --for-publish --tag ${{ github.ref_name }} --release-dir . .' - name: Publish GitHub release uses: actions/github-script@v7 with: diff --git a/.github/workflows/sync-plugin-version.yml b/.github/workflows/sync-plugin-version.yml deleted file mode 100644 index f74f8a9..0000000 --- a/.github/workflows/sync-plugin-version.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Sync plugin.json version -on: - push: - tags: ['v*'] -permissions: - contents: write - pull-requests: write -jobs: - sync: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - ref: main - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - - name: Compute target version from tag - id: ver - run: | - TAG="${GITHUB_REF_NAME}" - VERSION="${TAG#v}" - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "tag=$TAG" >> $GITHUB_OUTPUT - - name: Update plugin.json - run: | - if [ ! -f plugin.json ]; then echo "no plugin.json; skipping"; exit 0; fi - CURRENT=$(python3 -c "import json; print(json.load(open('plugin.json')).get('version',''))") - TARGET="${{ steps.ver.outputs.version }}" - if [ "$CURRENT" = "$TARGET" ]; then - echo "plugin.json already at $TARGET; no action" - exit 0 - fi - python3 -c " - import json - p = json.load(open('plugin.json')) - p['version'] = '$TARGET' - json.dump(p, open('plugin.json', 'w'), indent=2) - open('plugin.json', 'a').write('\n') - " - - name: Open sync PR if plugin.json changed - run: | - if git diff --quiet plugin.json; then - echo "no changes" - exit 0 - fi - BRANCH="chore/sync-plugin-version-${{ steps.ver.outputs.tag }}" - git config user.email "github-actions[bot]@users.noreply.github.com" - git config user.name "github-actions[bot]" - git checkout -b "$BRANCH" - git add plugin.json - git commit -m "chore: sync plugin.json version to ${{ steps.ver.outputs.tag }}" - git push origin "$BRANCH" - gh pr create \ - --base main \ - --head "$BRANCH" \ - --title "chore: sync plugin.json version to ${{ steps.ver.outputs.tag }}" \ - --body "Triggered by release ${{ steps.ver.outputs.tag }}. Auto-sync to prevent drift. Closes workflow-registry#37." - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/plugin.json b/plugin.json index cf4ac18..4966c7d 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "workflow-plugin-openlms", - "version": "0.1.3", + "version": "0.0.0", "description": "OpenLMS learning management plugin", "author": "GoCodeAlone", "license": "MIT", From 938f861118cdbd7f7cc53d1bae20d84f9b433075 Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Mon, 1 Jun 2026 13:44:57 -0400 Subject: [PATCH 2/2] fix: clarify release contract check --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4452a82..9aec123 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,8 @@ jobs: fi "${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" . - name: Verify shipped plugin.json carries tag (post-build) - run: '"${{ runner.temp }}/wfctl-bin/wfctl" plugin validate-contract --for-publish --tag ${{ github.ref_name }} --release-dir . .' + run: | + "${{ runner.temp }}/wfctl-bin/wfctl" plugin validate-contract --for-publish --tag ${{ github.ref_name }} --release-dir . . - name: Publish GitHub release uses: actions/github-script@v7 with: