Commit 081361f
authored
ci(release): switch to v*.*.* tag trigger and add workflow_dispatch (#739)
## Summary
- Auto-trigger of `Release` workflow is now scoped to `v*.*.*` tags
only. The legacy `gravity-mainnet-*` / `gravity-testnet-*` patterns are
dropped — future releases follow a single `v<major>.<minor>.<patch>`
track.
- Added a `workflow_dispatch` input so a release can be re-run manually
from the Actions UI against any existing `v*.*.*` tag (useful for
retrying a failed upload or pushing the docker image for a tag whose
initial run was interrupted).
- Checkout step now follows the dispatched tag when invoked via
`workflow_dispatch`; on `push` / `pull_request` it falls back to the
default ref.
- `Resolve tag` step validates the pattern via a regex
(`^v[0-9]+\.[0-9]+\.[0-9]+`) for both push and dispatch paths — accepts
`v1.7.0`, `v1.7.0-rc1`, etc., rejects anything that doesn't start with a
SemVer-shaped prefix.
## Test plan
- [ ] `lint-workflows` (actionlint) passes on this PR.
- [ ] PR dry-run path (`if: github.event_name == 'pull_request'`) still
runs build + stage assets + docker build (no push).
- [ ] After merge to `main`: open Actions → Release → Run workflow →
enter a known existing tag (e.g. `v0.5.0`) and confirm the dispatch path
resolves the tag, builds, and re-uploads assets to that release with
`--clobber`.
- [ ] Cut `v1.7.0` via GitHub UI Draft Release → Publish → confirm the
push path triggers and the release receives `gravity_node`,
`gravity_cli`, their `.sha256` files, and
`ghcr.io/galxe/gravity_node:v1.7.0`.
## Notes
- `workflow_dispatch` registrations are only visible on the **default
branch's** copy of the workflow file. So the UI button will not appear
until this is merged into `main`.
- This PR does not change the requirement that a GitHub Release must
exist before the `gh release upload` step — that contract is unchanged.1 parent c2db5c0 commit 081361f
1 file changed
Lines changed: 24 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | | - | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
139 | 149 | | |
140 | 150 | | |
141 | 151 | | |
| 152 | + | |
| 153 | + | |
142 | 154 | | |
143 | 155 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
149 | 165 | | |
150 | 166 | | |
151 | 167 | | |
| |||
0 commit comments