Skip to content

Commit

Permalink
Merge pull request #6 from multiversx/publish-workflow
Browse files Browse the repository at this point in the history
Create publish-workflow
  • Loading branch information
johnykes committed Jan 10, 2023
2 parents df2e958 + 1b40e1e commit 009b85b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish-workflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Native auth client

on:
workflow_dispatch:

permissions:
contents: write

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_TAG=v$(node -p "require('./package.json').version")
gh release create $RELEASE_TAG --target=$GITHUB_SHA --title="$RELEASE_TAG" --generate-notes

- run: npm ci
- run: npm test

- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish --access=public

0 comments on commit 009b85b

Please sign in to comment.