Skip to content

Commit

Permalink
Add publish-npm script
Browse files Browse the repository at this point in the history
  • Loading branch information
arhtudormorar committed Apr 23, 2024
1 parent 5c967bd commit e46d4c7
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 31 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish sdk-web-wallet-cross-window-provider

on:
push:
branches: [main]
repository_dispatch:
types: publish-npm
workflow_dispatch:

permissions:
contents: write

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v1
with:
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install dependencies
run: npm install

- name: Build project
run: npm run compile

- name: Get package info
id: package
uses: andreigiura/[email protected]

- name: Publish to npmjs next version
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.package.outputs.is-prerelease == 'true'}}
run: echo ${{ steps.package.outputs.is-prerelease}} && cd dist && npm publish --tag next

- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.package.outputs.is-prerelease == 'false' }}
run: cd dist && npm publish
31 changes: 0 additions & 31 deletions .github/workflows/publish.yml

This file was deleted.

0 comments on commit e46d4c7

Please sign in to comment.