Merge pull request #58 from Techwolf12/Techwolf12-patch-1
Add a Github workflow to publish releasespull/91/head
commit
6e72ae02b9
|
@ -0,0 +1,26 @@
|
||||||
|
name: Publish to NPM
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
cache: 'yarn'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
- name: Get the release tag version
|
||||||
|
id: get_version
|
||||||
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||||
|
- name: Set package version
|
||||||
|
run: yarn version --new-version "${{ steps.get_version.outputs.VERSION }}" --no-git-tag-version
|
||||||
|
- name: Publish package
|
||||||
|
run: yarn publish --access public
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
Loading…
Reference in New Issue