Skip to content

Commit

Permalink
Merge pull request #106 from The-Poolz/issue-64
Browse files Browse the repository at this point in the history
add release script
  • Loading branch information
YouStillAlive authored May 15, 2024
2 parents b01b9e5 + 08e4175 commit 8719652
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish on Release

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: master

- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Get Release Tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Set git user
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: Set version ${{ env.tag }}
run: |
npm version ${{ env.tag }}
git push
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 8719652

Please sign in to comment.