Skip to content

Commit e3775e1

Browse files
authored
Fix release workflow (#100)
* fix release workflow Signed-off-by: Jorge Prendes <[email protected]> * use ubuntu for release workflow Signed-off-by: Jorge Prendes <[email protected]> * untar vendored archive before doing diff Signed-off-by: Jorge Prendes <[email protected]> --------- Signed-off-by: Jorge Prendes <[email protected]>
1 parent 1cb97ca commit e3775e1

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

.github/workflows/CreateRelease.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# see https://github.com/orgs/community/discussions/26286#discussioncomment-3251208 for why we need to check the ref
1919
if: ${{ contains(github.ref, 'refs/heads/release/') }} || ${{ github.ref=='refs/heads/main' }}
2020
needs: [ benchmarks ]
21-
runs-on: windows-latest
21+
runs-on: ubuntu-latest
2222
env:
2323
PLATFORM: x64
2424
steps:
@@ -41,12 +41,17 @@ jobs:
4141
- name: Verify vendor.tar
4242
if: ${{ contains(github.ref, 'refs/heads/release/') }}
4343
run: |
44-
mv ./src/hyperlight_wasm/vendor.tar ./vendor.tar
44+
set -euxo pipefail
45+
VENDOR1=$(mktemp -d)
46+
VENDOR2=$(mktemp -d)
47+
tar xf ./src/hyperlight_wasm/vendor.tar -C $VENDOR1
4548
just make-vendor-tar
46-
if ! git diff --no-index ./vendor.tar ./src/hyperlight_wasm/vendor.tar; then
49+
tar xf ./src/hyperlight_wasm/vendor.tar -C $VENDOR2
50+
if ! git diff --no-index $VENDOR1 $VENDOR2; then
4751
echo "vendor.tar is not up to date, please run 'just make-vendor-tar' and commit the changes"
4852
exit 1
4953
fi
54+
git restore ./src/hyperlight_wasm/vendor.tar
5055
shell: bash
5156
- name: Package hyperlight-wasm crate
5257
if: ${{ contains(github.ref, 'refs/heads/release/') }}
@@ -55,16 +60,16 @@ jobs:
5560
- name: Install minver_rs
5661
run: |
5762
cargo install minver_rs
58-
shell: pwsh
63+
shell: bash
5964
- name: Set HYPERLIGHTWASM_VERSION
6065
run: |
6166
git fetch --tags || true
62-
$env:MINVER_TAG_PREFIX="v"
63-
$env:MINVER_AUTO_INCREMENT_LEVEL="Minor"
64-
$env:MINVER_PRERELEASE_IDENTIFIER="preview"
65-
echo "HYPERLIGHTWASM_VERSION=$(minver)"| Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
67+
export MINVER_TAG_PREFIX="v"
68+
export MINVER_AUTO_INCREMENT_LEVEL="Minor"
69+
export MINVER_PRERELEASE_IDENTIFIER="preview"
70+
echo "HYPERLIGHTWASM_VERSION=$(minver)" >> $GITHUB_ENV
6671
echo "HYPERLIGHTWASM_VERSION=$(minver)"
67-
shell: pwsh
72+
shell: bash
6873
- name: Download Wasm Modules
6974
uses: actions/download-artifact@v4
7075
with:

.github/workflows/CreateReleaseBranch.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
sed -i '/vendor.tar/d' ./src/hyperlight_wasm/.gitignore
2929
git add ./src/hyperlight_wasm/vendor.tar
3030
git add ./src/hyperlight_wasm/.gitignore
31-
git commit -m "Vendor dependencies for release ${GITHUB_REF_NAME}" -s -S
31+
git config user.name hyperlight-wasm-ci
32+
git config user.email [email protected]
33+
git commit -s \
34+
-m "Vendor dependencies for release ${GITHUB_REF_NAME}"
3235
git push --set-upstream origin release/${GITHUB_REF_NAME}
3336
shell: bash

Justfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"]
99

1010
make-vendor-tar:
1111
tar cf ./src/hyperlight_wasm/vendor.tar \
12+
--owner=0 --group=0 \
1213
--exclude-vcs-ignores \
1314
-C ./src wasm_runtime hyperlight_wasm_macro
1415

0 commit comments

Comments
 (0)