-
Notifications
You must be signed in to change notification settings - Fork 0
Harden Marketplace release workflow #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Verify release | ||
|
|
||
| on: | ||
| release: | ||
| types: | ||
| - published | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| verify: | ||
| name: verify action release | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Validate semantic release tag | ||
| shell: bash | ||
| env: | ||
| RELEASE_TAG: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| set -euo pipefail | ||
| if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "::error title=Invalid release tag::Expected a semantic patch tag such as v1.0.3, got $RELEASE_TAG." | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Checkout release | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ github.event.release.tag_name }} | ||
|
|
||
| - name: Install pinned yq | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| version="v4.44.3" | ||
| sha256="a2c097180dd884a8d50c956ee16a9cec070f30a7947cf4ebf87d5f36213e9ed7" | ||
| install_dir="${RUNNER_TEMP}/rabbit-action-bin" | ||
| mkdir -p "$install_dir" | ||
| curl -fsSL "https://github.com/mikefarah/yq/releases/download/${version}/yq_linux_amd64" -o "$install_dir/yq" | ||
| printf '%s %s\n' "$sha256" "$install_dir/yq" | sha256sum --check --status | ||
| chmod +x "$install_dir/yq" | ||
| echo "$install_dir" >> "$GITHUB_PATH" | ||
|
|
||
| - name: Verify release contract | ||
| shell: bash | ||
| run: make test | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this action are recorded here. Versions follow semantic | ||
| versioning; callers should normally use the maintained `v1` major tag. | ||
|
|
||
| ## v1.0.2 - 2026-08-18 | ||
|
|
||
| - Made lifecycle resolution and Rabbit configuration merging self-contained. | ||
| - Added caller-selectable lifecycle policy and configuration-root inputs. | ||
| - Kept cloud identity in the caller workflow; the action consumes prepared | ||
| runtime credentials only. | ||
|
|
||
| ## v1.0.1 - 2026-04-30 | ||
|
|
||
| - Initial GitHub Marketplace release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,43 @@ | ||
| .PHONY: test validate-shell validate-action validate-workflow | ||
| .PHONY: test validate-shell validate-shellcheck validate-action validate-workflow | ||
|
|
||
| test: validate-shell validate-action validate-workflow | ||
| test: validate-shell validate-shellcheck validate-action validate-workflow | ||
| tests/run-merge-tests.sh | ||
|
|
||
| validate-shell: | ||
| bash -n \ | ||
| bin/merge-configs.sh \ | ||
| bin/resolve-lifecycle.sh \ | ||
| bin/render-plan-summary.sh \ | ||
| bin/lib/config.sh \ | ||
| bin/lib/discovery.sh \ | ||
| bin/lib/github.sh \ | ||
| bin/lib/lifecycle.sh \ | ||
| bin/lib/validation.sh \ | ||
| bin/lib/environment.sh \ | ||
| bin/lib/logging.sh \ | ||
| bin/lib/merge.sh \ | ||
| bin/lib/output.sh \ | ||
| tests/run-merge-tests.sh | ||
|
|
||
| validate-shellcheck: | ||
| shellcheck --external-sources --severity=error \ | ||
| bin/merge-configs.sh \ | ||
| bin/resolve-lifecycle.sh \ | ||
| bin/render-plan-summary.sh \ | ||
| bin/lib/config.sh \ | ||
| bin/lib/discovery.sh \ | ||
| bin/lib/environment.sh \ | ||
| bin/lib/github.sh \ | ||
| bin/lib/lifecycle.sh \ | ||
| bin/lib/logging.sh \ | ||
| bin/lib/merge.sh \ | ||
| bin/lib/output.sh \ | ||
| bin/lib/validation.sh \ | ||
| tests/run-merge-tests.sh | ||
|
|
||
| validate-action: | ||
| yq eval '.' action.yml >/dev/null | ||
|
|
||
| validate-workflow: | ||
| yq eval '.' .github/workflows/ci.yml >/dev/null | ||
| yq eval '.' .github/workflows/release.yml >/dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Releasing Rabbit Automation Action | ||
|
|
||
| The action is released from `production`. Patch releases are immutable | ||
| `v1.x.y` tags; `v1` is the movable compatibility tag that callers use. | ||
|
|
||
| ## Before publishing | ||
|
|
||
| 1. Merge a focused, reviewed pull request into `production`. | ||
| 2. Confirm the CI action-contract and workflow-lint jobs pass. | ||
| 3. Test the exact `production` commit from a caller's non-production | ||
| environment. Use `@production` only for that canary. | ||
| 4. Add a concise, user-facing entry to `CHANGELOG.md` when the behavior | ||
| changes. | ||
|
|
||
| ## Publish the release | ||
|
|
||
| 1. Create a semantic GitHub release from the tested `production` commit, for | ||
| example `v1.0.3`. | ||
| 2. In the release form, select **Publish this Action to the GitHub | ||
| Marketplace**. GitHub requires this UI step and may require 2FA; a release | ||
| created only through the REST or CLI release API is not enough. | ||
| 3. Keep `Deployment` as the primary Marketplace category and `Security` as the | ||
| secondary category unless the action's public purpose changes. | ||
| 4. Verify the Marketplace listing shows the new version, current `action.yml` | ||
| metadata, and current README before changing any caller references. | ||
|
|
||
| Publishing triggers `Verify release`, which checks the semantic tag and runs | ||
| the action contract from that tag. It confirms the published artifact; it does | ||
| not replace the pre-release caller canary or the Marketplace UI verification. | ||
|
|
||
| ## Promote callers | ||
|
|
||
| 1. Move the `v1` tag to the tested immutable release commit. | ||
| 2. Confirm `v1` and the patch tag resolve to the same commit with | ||
| `git ls-remote --tags origin 'v1*'`. | ||
| 3. Update reusable workflows and callers from `@production` to `@v1`. | ||
| 4. Run a non-production caller plan using `@v1` before merging the consumer | ||
| change. | ||
|
|
||
| Use a new major tag for breaking input, output, safety, or lifecycle-contract | ||
| changes. Keep `v1` on the latest compatible patch release; do not rewrite a | ||
| patch release tag. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.