Skip to content

Publish NPM

Publish NPM #21

Workflow file for this run

name: Publish NPM

Check failure on line 1 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

`update` is not a valid event name
on:
push:
tags:
- '*.*.*'
update:
tags:
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Configure Git user
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Bump version
run: npm version from-git
- name: Commit and push changes
run: git push origin ${GITHUB_REF#refs/tags/}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}