Fix and clarify workflow logic, add branch versioning
- `pr.yml` should've been deleted a long time ago. Its functionality was already elsewhere, and that's since been folded into `test.yml`. - I added automatic `release-v*` and `main-v*` versioning. - Renamed `merge.yml` to `push-release.yml` and `push-main.yml` to `pr-create-release.yml` so it's clearer what they're actually listening to. I also modified their display names.
This commit is contained in:
parent
08f5ccfeda
commit
542946fd74
5 changed files with 21 additions and 37 deletions
15
scripts/set-versioned-branch.sh
Normal file
15
scripts/set-versioned-branch.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
base="$1"
|
||||
|
||||
if [[ -z "$base" ]]; then
|
||||
echo '::error::Base branch is missing. Invoke as `bash scripts/set-versioned-branch.sh BASE' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
major=$(node -pe 'require("./package.json").version.replace(/\..*$/,"")')
|
||||
# Can't do a force push due to branch protection rules.
|
||||
git checkout "${base}"
|
||||
git checkout -B "${base}-v${major}"
|
||||
git push origin "${base}-v${major}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue