chore: configure Conventional Commits, Husky, and Changesets #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Version & Publish create-db | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
release: | |
name: Bump Version & Publish CLI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout with token | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: true # so we can push commits & tags | |
- name: Disable Husky in CI | |
run: echo "HUSKY=0" >> $GITHUB_ENV | |
- name: Setup Node & pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Bump versions & generate changelogs | |
run: pnpm version | |
- name: Push version bump & tags | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git push origin main --follow-tags | |
- name: Dry-run npm publish | |
run: pnpm --filter create-db publish --dry-run | |
- name: Publish create-db to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.CREATE_DB_TOKEN_NPM }} | |
run: pnpm --filter create-db publish --access public |