Skip to content

Commit 33c21b0

Browse files
committed
chore: update release procedure
1 parent cfec7ce commit 33c21b0

2 files changed

Lines changed: 20 additions & 10 deletions

File tree

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,24 @@ If you want to deploy your own copy of Release Drafter, follow the [Probot Deplo
473473
Run the following command:
474474

475475
```bash
476-
git checkout master && git pull && npm version [major | minor | patch]
476+
git checkout master
477+
git pull
478+
npm version [major | minor | patch] -m "chore: release %s"
477479
```
478480

481+
> [!IMPORTANT]
482+
> You may want the version increment to correspond to the last drafted release. You can use a verison number instead of `major | minor | patch` if needed.
483+
479484
The command does the following:
480485

481-
- Ensures you’re on master and don’t have local, un-commited changes
482-
- Bumps the version number in [package.json](package.json) based on major, minor or patch
483-
- Runs the `postversion` npm script in [package.json](package.json), which:
484-
- Runs test
485-
- Pushes the tag to GitHub, which triggers GitHub Action that does the following:
486-
- Releases NPM
487-
- Publish the Release Draft!
486+
- Run tests (`preversion` script)
487+
- Bumps the version number in [package.json](package.json) and create corresponding tag
488+
- Stage changes for git (`version` script)
489+
- Commit and tag
490+
- Push & push tag (`postversion` script)
491+
492+
After pushing, the `release.yml` workflow will trigger (`on: push: tag`), and :
493+
494+
- publish to npmjs
495+
- publish the release draft
496+
- update major tag (ex: pushing `v6.2.1` bumps `v6` to the same commit)

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"generate-fixtures": "node ./bin/generate-fixtures.js",
1919
"lint": "eslint bin/*.js lib/*.js action.js index.js test/**/*.js",
2020
"prettier": "prettier --write **/*.{js,md,json,yml}",
21-
"postversion": "npm run test && git push && git push --tags",
22-
"open-releases": "open \"$(node -e 'console.log(`${require(\"./package.json\").repository}/releases`)')\"",
21+
"preversion": "npm run test",
22+
"version": "git add package.json package-lock.json",
23+
"postversion": "git push && git push --tags",
2324
"prepare": "husky install"
2425
},
2526
"dependencies": {

0 commit comments

Comments
 (0)