Skip to content

Commit

Permalink
build: Was added npm publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
vMReal committed Sep 15, 2024
1 parent d419c5e commit 1c81923
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: npm

on:
workflow_dispatch:


jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Verify it's a tag
id: check_tag
run: |
if [[ -z "${GITHUB_REF##*refs/tags/*}" ]]; then
echo "This workflow can only be triggered on a tag."
exit 1
fi
- uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- run: npm run build

- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.RELEASE_PLEASE_NPM_TOKEN}}

0 comments on commit 1c81923

Please sign in to comment.