-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (35 loc) · 1.08 KB
/
release.yaml
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
name: Publish release
on:
create:
tags:
- v*
env:
SANDBOX_PORT: 3031
SANDBOX_DIR: '/tmp/near-usn-test-release-sandbox'
jobs:
test:
uses: ./.github/workflows/test.yaml
release:
needs: test
runs-on: ubuntu-latest
container:
image: nearprotocol/contract-builder
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
env:
RUSTFLAGS: -C link-arg=-s
steps:
- uses: actions/checkout@v2
- name: Build
run: |
rustup toolchain install stable
rustup default stable
rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown --profile testnet --features testnet
cargo build --target wasm32-unknown-unknown --profile mainnet --features mainnet
mv target/wasm32-unknown-unknown/mainnet/usn.wasm target/usn.mainnet.wasm
mv target/wasm32-unknown-unknown/testnet/usn.wasm target/usn.testnet.wasm
- name: Publish
uses: ncipollo/release-action@v1
with:
artifacts: "target/usn.*.wasm"
token: ${{ secrets.GITHUB_TOKEN }}