-
Notifications
You must be signed in to change notification settings - Fork 21
55 lines (44 loc) · 1.48 KB
/
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
name: Publish
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- '@acala-network/eth-transactions'
- '@acala-network/eth-providers'
- '@acala-network/eth-rpc-adapter'
- '@acala-network/bodhi'
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: setup yarn
run: npm install -g yarn
- name: install deps
run: yarn install --immutable
- name: build
run: yarn build
- name: git config email
run: git config --local user.email [email protected]
- name: git config name
run: git config --local user.name Bodhibot
# Writes token to .yarnrc.yml. If written directly in .yarnrc.yml, it will cause an error
- run: |
echo npmAuthToken: "\${NPM_AUTH_TOKEN}" >> ./.yarnrc.yml
- name: publish ${{ matrix.package }}
run: |
# version containing a hyphen, publish as beta, i.e: 1.0.0-1
if npm pkg get version --workspace ${{ matrix.package }} | jq '."${{ matrix.package }}"' | grep '-'; then TAG='--tag beta'; fi
yarn workspace ${{ matrix.package }} npm publish --tolerate-republish --access public $TAG
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- run: |
git checkout ./.yarnrc.yml