2021-02-20 00:02:41 +08:00
|
|
|
name: npm-publish
|
2022-12-20 00:45:27 +08:00
|
|
|
|
2021-02-20 00:02:41 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-02-21 20:53:49 +08:00
|
|
|
- npm
|
2022-12-20 00:45:27 +08:00
|
|
|
|
2021-02-20 00:02:41 +08:00
|
|
|
jobs:
|
|
|
|
npm-publish:
|
|
|
|
name: npm-publish
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-12-20 00:45:27 +08:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Publish if version has been updated
|
|
|
|
uses: pascalgn/npm-publish-action@1.3.9
|
|
|
|
with: # All of theses inputs are optional
|
2021-02-20 00:02:41 +08:00
|
|
|
tag_name: "%s"
|
|
|
|
tag_message: "%s"
|
|
|
|
commit_pattern: "^release\\:\ (.*)"
|
2022-12-20 00:45:27 +08:00
|
|
|
workspace: "."
|
|
|
|
env: # More info about the environment variables in the README
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
|
|
|
|
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
|