-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.12 KB
/
publish-npm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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}} && npm publish --tag next
- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.package.outputs.is-prerelease == 'false' }}
run: npm publish