NPM Publish Patch #12
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: NPM Publish Patch | |
on: | |
workflow_dispatch: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
CI: | |
uses: ./.github/workflows/ci.yml | |
publish: | |
runs-on: ubuntu-latest | |
# needs: CI | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout Repository | |
- name: Git Config | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- name: Install PNPM | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: 'pnpm' | |
- name: Install Dependencies | |
run: pnpm install | |
- run: pnpm run build:prod | |
name: Build Production | |
- name: Bump Patch Version | |
run: | | |
version=$(pnpm version patch) | |
- run: npm publish | |
name: Publish to NPM | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} | |
- name: Push Bumped Version | |
run: | | |
git push | |