Skip to content

Commit

Permalink
docs: improve release process (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
kepta authored Oct 4, 2023
1 parent 49cb6dc commit b31645b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
cache: 'pnpm'
- name: install
run: pnpm install --frozen-lockfile
- name: build
run: pnpm build
- name: build packages
run: pnpm build-packages
- name: lint
run: pnpm lint
- name: test
Expand Down
12 changes: 11 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,17 @@ Before submitting a PR, make sure to test your changes locally. Here's how:

For everything about Nalanda's documentation, head over to the `documentation` directory.
## 📝 Submitting Changes
## Releasing
1. Make sure your PRs titles are prefixed with right convention (`feat`, `docs`, `fix`, `refactor`, `test`, `perf`, `style`, `ci`, `build`).
1. ensure you are in `dev` branch and do `git pull origin dev`
1. Run `pnpm -r --filter scripts set-version x.y.z` to bump the version.
1. Go to github and create a new release with the tag that was created in the previous step.
1. Run `pnpm publish-alpha --otp=123456` or `publish-latest` to publish the packages to npm.
## ❓ Questions or Need Help?
Expand Down
9 changes: 8 additions & 1 deletion scripts/set-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ if (filesChanged) {
execSync(`git push origin v${version}`);
execSync(`git push origin HEAD --tags`);
console.log(`Committed and tagged version ${version}.`);
console.log(
`Visit https://github.com/bangle-io/nalanda/releases/new?tag=v${version} to add release notes.`,
);
} catch (error) {
console.error('Error committing or tagging the version:', error.message);
if (error instanceof Error) {
console.error('Error committing or tagging the version:', error.message);
} else {
throw error;
}
process.exit(1);
}
}
Expand Down

0 comments on commit b31645b

Please sign in to comment.