Skip to content

Commit

Permalink
Merge pull request #57 from vMReal/npm
Browse files Browse the repository at this point in the history
build: npm publish action was added
  • Loading branch information
vMReal authored Sep 15, 2024
2 parents d419c5e + c72e5eb commit 89d9f6e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 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}}
20 changes: 0 additions & 20 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,3 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}

- run: npm ci
if: ${{ steps.release.outputs.release_created }}

- run: npm run build
if: ${{ steps.release.outputs.release_created }}

- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.RELEASE_PLEASE_NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}

0 comments on commit 89d9f6e

Please sign in to comment.