Skip to content

Commit

Permalink
Merge pull request #1 from stickeeuk/feature/release
Browse files Browse the repository at this point in the history
Publish package
  • Loading branch information
stickeegreg authored Oct 16, 2023
2 parents 6af1618 + 28a38e6 commit 4765c5f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish package
on:
release:
types: [published]
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm set //npm.pkg.github.com/:_authToken ${{ secrets.GITHUB_TOKEN }}

- name: Publish package
env:
VERSION: ${{ github.event.release.tag_name }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
npm version "$VERSION"
npm publish

0 comments on commit 4765c5f

Please sign in to comment.