-
Notifications
You must be signed in to change notification settings - Fork 229
35 lines (33 loc) · 1.02 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
name: release
on:
release:
types: [created]
jobs:
flats:
runs-on: ubuntu-latest
steps:
- id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/setup-node@v1
with:
node-version: 10
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: npm-cache
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
- run: npm install
if: ${{ !steps.npm-cache.outputs.cache-hit }}
- run: npm run flatten
- run: zip flats $(find flats -name '*.sol')
- uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: flats.zip
asset_name: tokenbridge-contracts-flattened-${{ steps.get_release.outputs.tag_name }}.zip
asset_content_type: application/zip