-
Notifications
You must be signed in to change notification settings - Fork 11
59 lines (58 loc) · 1.76 KB
/
sdk.publish.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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Publish @akashaorg/core-sdk to npmjs
on:
push:
branches:
- next
paths:
- "libs/sdk/package.json"
- "libs/typings/package.json"
- "libs/composedb/package.json"
jobs:
build:
runs-on: ubuntu-latest
environment: Staging
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: corepack enable
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: yarn.lock
registry-url: 'https://registry.npmjs.org'
- run: node --version
- name: Get Secrets
uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.BW_ACCESS_TOKEN }}
secrets: |
4ac8adf4-03bd-4b3c-bd77-b1d500cf9863 > NPM_TOKEN
- name: install root dependencies
env:
CI: 1
NODE_ENV: production
run: |
yarn install --immutable
- run: echo "${GITHUB_WORKSPACE}/node_modules/.bin" >> $GITHUB_PATH
- run: nx run-many --target=prepare-publish --all --verbose
- name: Publish @akashaorg/core-sdk
working-directory: dist/npm/core-sdk
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
- name: Publish @akashaorg/typings
working-directory: dist/npm/typings
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
- name: Publish @akashaorg/composedb-models
working-directory: dist/npm/composedb
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}