Skip to content

Commit

Permalink
Update npm-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dmikey authored Oct 25, 2023
1 parent 401a05f commit e6d6fa1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ name: Publish to NPM

on:
workflow_dispatch:
release:
types: [created]

jobs:
build:
Expand All @@ -19,6 +21,18 @@ jobs:
node-version: 16
cache: yarn

- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}

- name: "change version"
uses: dmikey/[email protected]
with:
version: ${{ steps.get_release.outputs.tag_name }}
package: "./"

- name: Install dependencies
run: yarn install

Expand All @@ -30,4 +44,4 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.npm_token }}" > ~/.npmrc
npm publish --access public
npm publish --access public

0 comments on commit e6d6fa1

Please sign in to comment.