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
33
.github/workflows/push-release.yml
vendored
Normal file
33
.github/workflows/push-release.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Create release when pushing to `release`
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [release]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency: merge-release
|
||||
|
||||
jobs:
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npx pr-release merge --target release --source main --commit --force --clean --changelog ./docs/recent-changes.md --compact --minimize-semver-change
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
- run: bash scripts/set-versioned-branch.sh release
|
||||
# The following will publish the release to npm
|
||||
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
|
||||
name: Setup NPM Auth
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
- run: npm publish
|
||||
name: Publish
|
||||
Loading…
Add table
Add a link
Reference in a new issue