-
Notifications
You must be signed in to change notification settings - Fork 110
44 lines (35 loc) · 972 Bytes
/
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
name: Publish
on:
push:
tags:
- '*'
env:
ETH_NODE_URL: ${{ secrets.ETH_NODE_URL }}
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "18.20.0"
- name: Setup SSH to install dependencies
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Install dependencies
run: npm ci
- name: Compile contracts
run: npm run compile
- name: Run tests
run: npm test
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
token: ${{ secrets.NPM_ACCESS_TOKEN }}
access: "public"