Skip to content

Commit

Permalink
Chore: publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
ns212 committed Nov 4, 2022
1 parent 03d6616 commit 84158a1
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: npm

on:
push:
tags:
- "*"

jobs:
publish:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: "16"
registry-url: "https://registry.npmjs.org"
always-auth: true
- run: corepack enable
- run: yarn install
- run: yarn build
- run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- run: echo ${RELEASE_VERSION}
- name: publish
run: |
git config --global user.email "${GITHUB_ACTOR}"
git config --global user.name "${GITHUB_ACTOR}"
yarn publish --access public --new-version ${RELEASE_VERSION}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

0 comments on commit 84158a1

Please sign in to comment.