-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (73 loc) · 2.92 KB
/
Copy pathrelease.yml
File metadata and controls
82 lines (73 loc) · 2.92 KB
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
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: release
# Trigger the workflow when:
on:
# A push occurs to one of the matched tags.
push:
tags:
# Pattern that roughly matches Cipher ParaTime's version tags.
# For more details on GitHub Actions' pattern match syntax, see:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#patterns-to-match-branches-and-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.23.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: cipher-paratime
clean: no
features: debug-mock-sgx
setup: |
export OASIS_UNSAFE_SKIP_AVR_VERIFY=1 OASIS_UNSAFE_ALLOW_DEBUG_ENCLAVES=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-cipher-paratime.orc
popd
env:
RUNTIME_EXECUTABLE: ${{ github.workspace }}/${{ steps.build-debug-elf.outputs.build-path }}/cipher-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: cipher-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: cipher-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 ../cipher-paratime.orc
orc sgx-set-sig ../cipher-paratime.orc
popd
env:
RUNTIME_EXECUTABLE: ${{ github.workspace }}/${{ steps.build-elf.outputs.build-path }}/cipher-paratime
RUNTIME_SGXS: ${{ github.workspace }}/${{ steps.build-sgxs.outputs.build-path }}/cipher-paratime.sgxs
- name: Publish the release
uses: ncipollo/release-action@v1
with:
draft: true
artifacts: cipher-paratime.orc,localnet-cipher-paratime.orc
token: ${{ secrets.GITHUB_TOKEN }}