Merge pull request #37 from EdwinOtten/dependabot/npm_and_yarn/minoru… #27
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
# This workflow builds the package and uploads it to the NPM repository | |
name: Publish to NPM | |
# Trigger with every commit on master | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_and_publish_package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Publish to npm | |
uses: pascalgn/[email protected] | |
with: | |
tag_name: "%s" | |
tag_message: "%s" | |
commit_pattern: "^(?:Release|Version) (\\S+)" # Match a commit message if it starts with "Release " or "Version " followed by the version specified in package.json | |
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 |