feat: chain do-release from prepare workflow
- Update prepare-release to call do-release via workflow_call after tag creation. - Update README examples and release-flow docs to reflect direct invocation instead of relying only on tag-push triggers.
This commit is contained in:
29
README.md
29
README.md
@@ -37,6 +37,13 @@ jobs:
|
||||
- uses: git.hrafn.xyz/aether/vociferate/prepare@v1.0.0
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
|
||||
publish:
|
||||
needs: prepare
|
||||
uses: aether/vociferate/.gitea/workflows/do-release.yml@main
|
||||
with:
|
||||
tag: ${{ needs.prepare.outputs.version }}
|
||||
secrets: inherit
|
||||
```
|
||||
|
||||
Downloads a prebuilt vociferate binary, runs it to update `changelog.md` and
|
||||
@@ -63,17 +70,18 @@ so no token input is required.
|
||||
name: Do Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Semantic version to publish (for example v1.2.3)
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: git.hrafn.xyz/aether/vociferate/publish@v1.0.0
|
||||
uses: aether/vociferate/.gitea/workflows/do-release.yml@main
|
||||
with:
|
||||
tag: ${{ inputs.tag }}
|
||||
secrets: inherit
|
||||
```
|
||||
|
||||
Reads the matching section from `changelog.md` and creates or updates the
|
||||
@@ -169,9 +177,10 @@ just go-test
|
||||
Releases use two workflows:
|
||||
|
||||
- `Prepare Release` runs on demand, updates `release-version` and `changelog.md`, commits those changes back to `main`, and pushes the release tag.
|
||||
- `Do Release` runs from the pushed tag, reads the matching changelog section from that tagged revision, creates or updates the release, and uploads prebuilt binaries.
|
||||
- `Prepare Release` then calls `Do Release` directly via reusable `workflow_call` with the resolved tag.
|
||||
- `Do Release` reads the matching changelog section from that tagged revision, creates or updates the release, and uploads prebuilt binaries.
|
||||
|
||||
This split matters because release notes must be generated from the tagged commit that already contains the promoted changelog section.
|
||||
Calling `Do Release` directly avoids environments where tag pushes from workflow tokens do not emit a follow-up workflow trigger event.
|
||||
|
||||
## Release Artifacts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user