diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..62ff2f2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: Release + +on: + push: + branches: [main] + +permissions: + contents: write + +concurrency: + group: release + cancel-in-progress: false + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: main + fetch-depth: 0 + + - name: Plan release + id: plan + uses: wgtechlabs/release-build-flow-action@6df9cb42c24c296d902150d051a0b6be4422cccc # v1 + with: + initial-version: 0.1.0 + dry-run: true + changelog-enabled: false + sync-version-files: false + + - name: Update plugin version + if: steps.plan.outputs.version-bump-type != 'none' + env: + RELEASE_VERSION: ${{ steps.plan.outputs.version }} + run: | + jq --arg version "$RELEASE_VERSION" '.version = $version' .codex-plugin/plugin.json > "$RUNNER_TEMP/plugin.json" + mv "$RUNNER_TEMP/plugin.json" .codex-plugin/plugin.json + git add .codex-plugin/plugin.json + + - name: Publish release + if: steps.plan.outputs.version-bump-type != 'none' + uses: wgtechlabs/release-build-flow-action@6df9cb42c24c296d902150d051a0b6be4422cccc # v1 + with: + planned-version: ${{ steps.plan.outputs.version }} + planned-version-tag: ${{ steps.plan.outputs.version-tag }} + planned-version-bump-type: ${{ steps.plan.outputs.version-bump-type }} + planned-previous-version: ${{ steps.plan.outputs.previous-version }} + sync-version-files: false + changelog-path: ./CHANGELOG.md + commit-changelog: true + create-release: true diff --git a/README.md b/README.md index 5c94e87..8d05573 100644 --- a/README.md +++ b/README.md @@ -97,10 +97,21 @@ and omit `--ref`. Switch back to the stable installation commands after testing. See [skill verification](tests/skill-scenarios.md) for recorded installation results, behavior scenarios, and verification limits. -The installable package is version `0.1.0`, tracked in +The current installable package version is tracked in [`.codex-plugin/plugin.json`](.codex-plugin/plugin.json). The version badge at the top of this README refers to the convention specification, not the plugin. +### Automated releases + +Pushes to `main`, including a merged promotion PR, run the +[release workflow](.github/workflows/release.yml). It uses the same pinned +[Release Build Flow Action](https://github.com/wgtechlabs/release-build-flow-action) +configuration as Clean Coding and Clean Code Review: plan the version, update +the plugin manifest, then commit `CHANGELOG.md` and publish a tag and GitHub +Release when a version bump is needed. Existing release tags determine the +next version; `0.1.0` is the initial version when no tags exist. Other package +manifests are not synchronized by this workflow. + ### Skill ownership This repository is the canonical source for `clean-commit`. Maintain its skill