-
Notifications
You must be signed in to change notification settings - Fork 1
23 lines (23 loc) · 804 Bytes
/
Copy pathpublish.yml
File metadata and controls
23 lines (23 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: Publish NPM Package
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Set version to release tag 📝
run: pnpm version from-git --no-commit-hooks --no-git-tag-version --allow-same-version
- name: Publish to NPM
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push version changes to main branch
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: release ${{ github.event.release.tag_name }}"
branch: ${{ github.event.repository.default_branch }}
file_pattern: package.json