-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (44 loc) · 1.48 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
name: Production Release
on:
release:
types: [published]
jobs:
release:
name: Release
runs-on: ubuntu-latest
strategy:
matrix:
export_type: ['interfaces', 'all']
env:
PROJECT_NAME: '@defi-wonderland/prophet-modules'
EXPORT_NAME: ${{ matrix.export_type == 'interfaces' && '-interfaces' || '' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Node
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 20.x
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build project and generate out directory
run: yarn build
- name: Export Solidity - Export Type ${{ matrix.export_type }}
uses: defi-wonderland/[email protected]
with:
package_name: ${{ env.PROJECT_NAME }}
out: 'out'
interfaces: 'solidity/interfaces'
contracts: 'solidity/contracts'
libraries: "solidity/libraries"
export_type: '${{ matrix.export_type }}'
- name: Publish to NPM - Export Type ${{ matrix.export_type }}
run: cd export/${{ env.PROJECT_NAME }}${{ env.EXPORT_NAME }} && npm publish --access public --tag latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}