-
Notifications
You must be signed in to change notification settings - Fork 5
96 lines (81 loc) · 2.83 KB
/
CreateRelease.yml
File metadata and controls
96 lines (81 loc) · 2.83 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Create a Release
on:
workflow_dispatch:
push:
branches: [main]
permissions:
id-token: write
contents: write # needed to create a release
jobs:
build:
uses: ./.github/workflows/dep_build.yml
secrets: inherit
with:
environment: release
benchmarks:
uses: ./.github/workflows/dep_benchmarks.yml
secrets: inherit
with:
download-benchmarks: true
upload-benchmarks: true
environment: release
publish-hyperlight-js-packages-and-create-release:
needs: [build, benchmarks]
environment: release
runs-on: [self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd"]
if: ${{ contains(github.ref, 'refs/heads/release/') }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
# Ensures just is installed using setup wokflow to ensure just version consistency
- name: Hyperlight setup
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
with:
rust-toolchain: "1.89"
- name: Authenticate with crates.io
uses: rust-lang/crates-io-auth-action@v1
id: crates-io-auth
- name: Set crate versions
run: |
git fetch --tags || true
version=$(echo "${{ github.ref }}" | sed -E 's#refs/heads/release/v##')
echo "Setting version to 'v$version'"
echo "HYPERLIGHT_JS_VERSION=v$version" >> $GITHUB_ENV
- name: Publish hyperlight-js
run: |
cargo publish -p hyperlight-js-runtime
cargo publish -p hyperlight-js
env:
CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }}
- name: Download benchmarks (Windows)
uses: actions/download-artifact@v8
with:
name: benchmarks_Windows_whp
path: benchmarks_Windows_whp
- name: Download benchmarks (Linux kvm)
uses: actions/download-artifact@v8
with:
name: benchmarks_Linux_kvm
path: benchmarks_Linux_kvm
- name: Download benchmarks (Linux hyperv3)
uses: actions/download-artifact@v8
with:
name: benchmarks_Linux_hyperv3
path: benchmarks_Linux_hyperv3
- name: Archive benchmarks
run: |
tar -zcvf benchmarks_Windows_whp.tar.gz benchmarks_Windows_whp
tar -zcvf benchmarks_Linux_kvm.tar.gz benchmarks_Linux_kvm
tar -zcvf benchmarks_Linux_hyperv3.tar.gz benchmarks_Linux_hyperv3
- name: Create GH Release
run: |
gh release create ${{ env.HYPERLIGHT_JS_VERSION }} \
--generate-notes \
benchmarks_Windows_whp.tar.gz \
benchmarks_Linux_kvm.tar.gz \
benchmarks_Linux_hyperv3.tar.gz
env:
GH_TOKEN: ${{ github.token }}