diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 5ec1de8..f2bc1f3 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -18,7 +18,7 @@ jobs: # see https://github.com/orgs/community/discussions/26286#discussioncomment-3251208 for why we need to check the ref if: ${{ contains(github.ref, 'refs/heads/release/') }} || ${{ github.ref=='refs/heads/main' }} needs: [ benchmarks ] - runs-on: windows-latest + runs-on: ubuntu-latest env: PLATFORM: x64 steps: @@ -41,12 +41,17 @@ jobs: - name: Verify vendor.tar if: ${{ contains(github.ref, 'refs/heads/release/') }} run: | - mv ./src/hyperlight_wasm/vendor.tar ./vendor.tar + set -euxo pipefail + VENDOR1=$(mktemp -d) + VENDOR2=$(mktemp -d) + tar xf ./src/hyperlight_wasm/vendor.tar -C $VENDOR1 just make-vendor-tar - if ! git diff --no-index ./vendor.tar ./src/hyperlight_wasm/vendor.tar; then + tar xf ./src/hyperlight_wasm/vendor.tar -C $VENDOR2 + if ! git diff --no-index $VENDOR1 $VENDOR2; then echo "vendor.tar is not up to date, please run 'just make-vendor-tar' and commit the changes" exit 1 fi + git restore ./src/hyperlight_wasm/vendor.tar shell: bash - name: Package hyperlight-wasm crate if: ${{ contains(github.ref, 'refs/heads/release/') }} @@ -55,16 +60,16 @@ jobs: - name: Install minver_rs run: | cargo install minver_rs - shell: pwsh + shell: bash - name: Set HYPERLIGHTWASM_VERSION run: | git fetch --tags || true - $env:MINVER_TAG_PREFIX="v" - $env:MINVER_AUTO_INCREMENT_LEVEL="Minor" - $env:MINVER_PRERELEASE_IDENTIFIER="preview" - echo "HYPERLIGHTWASM_VERSION=$(minver)"| Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append + export MINVER_TAG_PREFIX="v" + export MINVER_AUTO_INCREMENT_LEVEL="Minor" + export MINVER_PRERELEASE_IDENTIFIER="preview" + echo "HYPERLIGHTWASM_VERSION=$(minver)" >> $GITHUB_ENV echo "HYPERLIGHTWASM_VERSION=$(minver)" - shell: pwsh + shell: bash - name: Download Wasm Modules uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/CreateReleaseBranch.yml b/.github/workflows/CreateReleaseBranch.yml index ac34228..4161fdf 100644 --- a/.github/workflows/CreateReleaseBranch.yml +++ b/.github/workflows/CreateReleaseBranch.yml @@ -28,6 +28,9 @@ jobs: sed -i '/vendor.tar/d' ./src/hyperlight_wasm/.gitignore git add ./src/hyperlight_wasm/vendor.tar git add ./src/hyperlight_wasm/.gitignore - git commit -m "Vendor dependencies for release ${GITHUB_REF_NAME}" -s -S + git config user.name hyperlight-wasm-ci + git config user.email github@users.noreply.github.com + git commit -s \ + -m "Vendor dependencies for release ${GITHUB_REF_NAME}" git push --set-upstream origin release/${GITHUB_REF_NAME} shell: bash diff --git a/Justfile b/Justfile index 5286903..209b2c0 100644 --- a/Justfile +++ b/Justfile @@ -9,6 +9,7 @@ set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"] make-vendor-tar: tar cf ./src/hyperlight_wasm/vendor.tar \ + --owner=0 --group=0 \ --exclude-vcs-ignores \ -C ./src wasm_runtime hyperlight_wasm_macro