Bump object from 0.38.1 to 0.39.0 (#436) #292
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | ||
| name: Create a Release | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [ release/**, main ] | ||
| permissions: | ||
| contents: write | ||
| packages: write | ||
| id-token: write # Required for crates.io trusted publishing | ||
| jobs: | ||
| benchmarks: | ||
| uses: ./.github/workflows/Benchmarks.yml | ||
| publish: | ||
| # 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' }} | ||
|
Check warning on line 20 in .github/workflows/CreateRelease.yml
|
||
| needs: [ benchmarks ] | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| PLATFORM: x64 | ||
| steps: | ||
| - name: Set Debug Configuration | ||
| if: ${{ github.ref=='refs/heads/main' }} | ||
| run: echo "CONFIG=debug" >> $GITHUB_ENV | ||
| - name: Set Release Configuration | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| run: echo "CONFIG=release" >> $GITHUB_ENV | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| # 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: Package hyperlight-wasm crate | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| run: cargo package -p hyperlight-wasm | ||
| shell: bash | ||
| - name: Set HYPERLIGHTWASM_VERSION | ||
| run: | | ||
| git fetch --tags | ||
| version=$(echo "${{ github.ref }}" | sed -E 's#refs/heads/release/v##') | ||
| echo "HYPERLIGHTWASM_VERSION=$version" >> $GITHUB_ENV | ||
| echo "HYPERLIGHTWASM_VERSION=$version" | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| shell: bash | ||
| - name: Download Wasm Modules | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| name: guest-modules | ||
| path: ${{ env.PLATFORM }}/${{ env.CONFIG }} | ||
| - name: Build rust wasm modules | ||
| run: just build-rust-wasm-examples ${{ env.CONFIG }} | ||
| shell: bash | ||
| - name: Download all benchmarks | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| pattern: benchmarks_* | ||
| - name: Archive benchmarks | ||
| shell: bash | ||
| run: | | ||
| for BENCHMARK in benchmarks_*; do | ||
| tar -zcvf $BENCHMARK.tar.gz $BENCHMARK | ||
| done | ||
| - name: Create pre-release | ||
| if: ${{ github.ref=='refs/heads/main' }} | ||
| run: | | ||
| echo "PWD: $PWD" | ||
| ls -alR | ||
| gh release delete dev-latest -y --cleanup-tag || true | ||
| gh release create dev-latest -t "Latest Development Build From Dev Branch" --latest=false -p \ | ||
| benchmarks_*.tar.gz | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| shell: bash | ||
| - name: Create Release | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| run: | | ||
| echo "PWD: $PWD" | ||
| ls -alR | ||
| gh release create v${{ env.HYPERLIGHTWASM_VERSION }} -t "Release v${{ env.HYPERLIGHTWASM_VERSION }}" --generate-notes \ | ||
| benchmarks_*.tar.gz | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| shell: bash | ||
| - name: Authenticate with crates.io | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| uses: rust-lang/crates-io-auth-action@v1 | ||
| id: crates-io-auth | ||
| - name: Install cargo-overlay-registry | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| run: cargo install cargo-overlay-registry | ||
| shell: bash | ||
| - name: Publish dry-run | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| run: | | ||
| set -euxo pipefail | ||
| rm -Rf ./target/package/tmp-registry | ||
| cargo overlay-registry \ | ||
| -r crates-io \ | ||
| -r local=./target/package/tmp-registry \ | ||
| -- \ | ||
| cargo +1.92 publish --dry-run \ | ||
| -p hyperlight-wasm-aot \ | ||
| -p hyperlight-wasm-macro \ | ||
| -p hyperlight-wasm-runtime \ | ||
| -p hyperlight-wasm | ||
| shell: bash | ||
| - name: Publish to crates.io | ||
| if: ${{ contains(github.ref, 'refs/heads/release/') }} | ||
| run: | | ||
| set -euxo pipefail | ||
| rm -Rf ./target/package/tmp-registry | ||
| cargo overlay-registry \ | ||
| -r crates-io \ | ||
| -r local=./target/package/tmp-registry \ | ||
| -- \ | ||
| cargo +1.92 publish \ | ||
| -p hyperlight-wasm-aot \ | ||
| -p hyperlight-wasm-macro \ | ||
| -p hyperlight-wasm-runtime \ | ||
| -p hyperlight-wasm | ||
| env: | ||
| CARGO_REGISTRY_TOKEN: ${{ steps.crates-io-auth.outputs.token }} | ||
| shell: bash | ||