This repository was archived by the owner on Mar 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
122 lines (115 loc) · 3.4 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]-[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
env:
NODE_VERSION: 16
RUST_TOOLCHAIN: nightly
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Prepare release files
run: |
mv target/release/drml .
tar cf drml.tar.zst drml -I pzstd
mkdir artifacts
mv drml.tar.zst artifacts
mv target/release/wbuild/pangolin-runtime/*.compressed.wasm artifacts
mv target/release/wbuild/pangoro-runtime/*.compressed.wasm artifacts
- name: Upload
uses: actions/[email protected]
with:
name: artifacts
path: artifacts
build-with-evm-tracing:
name: Build with evm-tracing
runs-on: ubuntu-latest
steps:
- name: Fetch latest code
uses: actions/checkout@v3
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
default: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features evm-tracing
- name: Prepare release files
run: |
mv target/release/drml .
tar cf drml-tracing-node.tar.zst drml -I pzstd
mkdir artifacts
mv drml-tracing-node.tar.zst artifacts
- name: Upload
uses: actions/[email protected]
with:
name: artifacts
path: artifacts
release:
name: Release
needs: [build, build-with-evm-tracing]
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v2
with:
name: artifacts
path: artifacts
- name: Hash
run: |
cd artifacts
sha256sum * | tee SHA256
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: artifacts/*
# rustdoc:
# name: Rustdoc
# runs-on: ubuntu-latest
# steps:
# - name: Fetch latest code
# uses: actions/checkout@v3
# - name: Install Rust nightly-2021-02-25 toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: nightly-2021-02-25
# target: wasm32-unknown-unknown
# default: true
# - name: Build
# uses: actions-rs/cargo@v1
# with:
# command: doc
# args: --release --locked --all --no-deps
# - name: Install Node ${{ env.NODE_VERSION }}
# uses: actions/setup-node@v2
# with:
# node-version: ${{ env.NODE_VERSION }}
# - name: Install Vercel
# run: npm i -g vercel
# - name: Deploy Rustdoc
# run: |
# mv vercel.json target/doc
# mv target/doc target/${GITHUB_REPOSITORY#*/}
# cd target/${GITHUB_REPOSITORY#*/}
# vercel --token ${{ secrets.VERCEL_TOKEN }} --scope itering link --confirm
# vercel --token ${{ secrets.VERCEL_TOKEN }} --scope itering deploy --prod