-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (52 loc) · 1.81 KB
/
release.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
60
61
62
63
64
name: Create or add to release PR
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@4
with:
release-type: node
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
with:
submodules: 'recursive'
- uses: pnpm/action-setup@v4
if: ${{ steps.release.outputs.release_created }}
with:
version: 8.15.8
- name: Setup node
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Cache NPM dependencies
if: ${{ steps.release.outputs.release_created }}
uses: actions/cache@v4
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
- name: Install dependencies
if: ${{ steps.release.outputs.release_created && steps.cache.outputs.cache-hit != 'true' }}
run: pnpm install --frozen-lockfile
- name: Install dependencies for colonyNetwork
if: ${{ steps.release.outputs.release_created }}
working-directory: ./vendor/colonyNetwork
run: pnpm install --frozen-lockfile
- name: Compile colonyNetwork contracts
if: ${{ steps.release.outputs.release_created }}
working-directory: ./vendor/colonyNetwork
run: npx hardhat compile
- name: Run build
if: ${{ steps.release.outputs.release_created }}
run: pnpm run build
- name: Publish to npm
if: ${{ steps.release.outputs.release_created }}
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}