chore(release): bump version to v0.1.72 #59
This file contains 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: Publish | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
publish: | |
if: | | |
!contains(github.event.head_commit.message, 'chore(release)') | |
&& !contains(github.event.head_commit.message, '(assets)') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
token: ${{ secrets.PAT }} | |
- name: Setup NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Set Git Config | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Auth | |
run: | | |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | |
npm whoami | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Pull latest changes | |
run: git pull origin main | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Bump version and create commit | |
run: | | |
# Replace 'patch' with 'minor' or 'major' if you want to bump a different version part | |
npm version patch --no-git-tag-version | |
git commit -am "chore(release): bump version to v$(node -p "require('./package.json').version")" | |
git push | |
- name: Publish to npm | |
run: npm publish |