forked from DA0-DA0/dao-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.1 KB
/
release-contracts.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
name: Release contracts
permissions:
contents: write
on:
push:
tags:
- "v*"
branches:
- main
- ci/release-contracts
jobs:
release:
runs-on: ubuntu-latest
container: cosmwasm/optimizer:0.16.0
steps:
- uses: actions/checkout@v3
# tar is required for cargo cache
- run: apk add --no-cache tar
- name: Set up cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Compile contracts
timeout-minutes: 30
run: optimize.sh .
- name: Upload contracts
uses: actions/upload-artifact@v3
with:
name: contracts
path: artifacts/
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: artifacts/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}