| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b54c312 commit 51bae95
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,11 +16,14 @@ on: | |||
| 16 | 16 | required: true | |
| 17 | 17 | type: string | |
| 18 | 18 | ||
| 19 | + # Permissions must NOT exceed what the caller (release.yml's | ||
| 20 | + # `custom-publish-docker` job) grants — reusable workflows can't widen | ||
| 21 | + # permissions. cargo-dist gives custom publish jobs id-token + packages | ||
| 22 | + # write, plus the workflow-level contents: write inherited via the | ||
| 23 | + # caller. That's enough for GHCR push and gh release download. | ||
| 19 | 24 | permissions: | |
| 20 | - contents: read | ||
| 21 | 25 | packages: write | |
| 22 | 26 | id-token: write | |
| 23 | - attestations: write | ||
| 24 | 27 | ||
| 25 | 28 | env: | |
| 26 | 29 | REGISTRY: ghcr.io | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -67,6 +67,11 @@ release-bump version: | |||
| 67 | 67 | echo "Error: working tree is not clean. Commit or stash changes before bumping." >&2 | |
| 68 | 68 | exit 1 | |
| 69 | 69 | fi | |
| 70 | + current_version=$(sed -nE 's/^version = "(.+)"/\1/p' Cargo.toml | head -1) | ||
| 71 | + if [[ "$current_version" == "{{version}}" ]]; then | ||
| 72 | + echo "Cargo.toml is already at {{version}}. No bump needed — skip to: just release-tag-main {{version}}" >&2 | ||
| 73 | + exit 0 | ||
| 74 | + fi | ||
| 70 | 75 | git checkout -b "release/v{{version}}" | |
| 71 | 76 | sed -i.bak 's/^version = ".*"/version = "{{version}}"/' Cargo.toml && rm Cargo.toml.bak | |
| 72 | 77 | # Refresh Cargo.lock so it matches the new version. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments