-
Notifications
You must be signed in to change notification settings - Fork 37
42 lines (34 loc) · 1.33 KB
/
release-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
name: Publish
on:
release:
types: [ published ]
jobs:
npm:
name: NPM
runs-on: ubuntu-latest
environment: NPM Release Publishing
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version-file: '.nvmrc'
- run: npm ci
- name: Resolve Version
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
id: version
with:
script: return require('./.github/scripts/release-ecr-tags.js')({ context })
result-encoding: string
- run: npm run compile
- run: npm run all:build
- run: npm run all:version ${{ steps.version.outputs.result }}
# Because lerna doesn't update peers deps, although using it "wrongly" this behavior ensures all jellyfish deps are aligned.
- name: find and replace peerDependencies
run: |
find packages/*/package.json -type f -exec sed -i 's# "defichain": "^0.0.0"# "defichain": "^${{ steps.version.outputs.result }}"#g' {} \;
- name: Publish
run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
npm run all:publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}