-
Notifications
You must be signed in to change notification settings - Fork 27
75 lines (66 loc) · 2.56 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
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
name: release
on:
push:
tags:
- 'v[0-9]+.[0-9]+*'
jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- name: Build tagged release, elf, debug
id: build-debug-elf
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
with:
image: ghcr.io/oasisprotocol/runtime-builder:main
pkg-dirs: runtime
binaries: sapphire-paratime
clean: no
setup: |
export OASIS_UNSAFE_SKIP_AVR_VERIFY=1 OASIS_UNSAFE_SKIP_KM_POLICY=1 OASIS_UNSAFE_ALLOW_DEBUG_ENCLAVES=1 OASIS_UNSAFE_USE_LOCALNET_CHAINID=1
- name: Create the debug Oasis Runtime Container
run: |
go install github.com/oasisprotocol/oasis-sdk/tools/orc@latest
pushd runtime
orc init ${RUNTIME_EXECUTABLE} --output ../localnet-sapphire-paratime.orc
popd
env:
RUNTIME_EXECUTABLE: ${{ github.workspace }}/${{ steps.build-debug-elf.outputs.build-path }}/sapphire-paratime
- name: Build tagged release, elf
id: build-elf
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
with:
image: ghcr.io/oasisprotocol/runtime-builder:main
pkg-dirs: runtime
binaries: sapphire-paratime
clean: no
- name: Build tagged release, sgxs
id: build-sgxs
uses: oasisprotocol/oasis-sdk/.github/actions/hash-rust@main
with:
image: ghcr.io/oasisprotocol/runtime-builder:main
pkg-dirs: runtime
binaries: sapphire-paratime.sgxs
clean: no
sgx: yes
- name: Create the Oasis Runtime Container
run: |
go install github.com/oasisprotocol/oasis-sdk/tools/orc@latest
pushd runtime
orc init ${RUNTIME_EXECUTABLE} --sgx-executable ${RUNTIME_SGXS} --output ../sapphire-paratime.orc
popd
env:
RUNTIME_EXECUTABLE: ${{ github.workspace }}/${{ steps.build-elf.outputs.build-path }}/sapphire-paratime
RUNTIME_SGXS: ${{ github.workspace }}/${{ steps.build-sgxs.outputs.build-path }}/sapphire-paratime.sgxs
- name: Publish the release
uses: ncipollo/release-action@v1
with:
# Create a draft since the release requires an offline signing process.
draft: true
artifacts: sapphire-paratime.orc,localnet-sapphire-paratime.orc
token: ${{ secrets.GITHUB_TOKEN }}