Skip to content

Commit

Permalink
Merge pull request #24 from MarvNC:release-on-tag-push
Browse files Browse the repository at this point in the history
Update npm-publish.yml workflow to publish release on tag push
  • Loading branch information
MarvNC authored Jul 18, 2024
2 parents dc91573 + d66d06d commit 917ca85
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,13 @@
name: Node.js Package

on:
release:
types: [created]
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
# - run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -32,3 +22,14 @@ jobs:
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

create-release:
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
draft: false
prerelease: false
generate_release_notes: true

0 comments on commit 917ca85

Please sign in to comment.