Skip to content

Commit

Permalink
Merge pull request #20 from hyperlight-dev/update-create-release
Browse files Browse the repository at this point in the history
Update CreateRelease workflow
  • Loading branch information
jprendes authored Nov 6, 2024
2 parents 5d03294 + c414a41 commit 89f5fb5
Showing 1 changed file with 6 additions and 47 deletions.
53 changes: 6 additions & 47 deletions .github/workflows/CreateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ on:

permissions:
contents: write
packages: write # This is needed to publish nuget packages
id-token: write # Needed for federated auth to our ADO feeds
pull-requests: read
id-token: write

jobs:

Expand All @@ -23,15 +21,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install az-cli (Linux mariner) (move into hyperlight-workflow-setup!)
if: ${{ (runner.os == 'Linux') }}
run: |
if command -v dnf > /dev/null 2>&1; then
sudo dnf install azure-cli -y
fi
shell: bash


- uses: hyperlight-dev/[email protected]
with:
rust-toolchain: "1.81.0"
Expand Down Expand Up @@ -94,8 +83,6 @@ 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' }}
runs-on: windows-2022
outputs:
HYPERLIGHT_VERSION: ${{ steps.set_hyperlight_version.outputs.HYPERLIGHT_VERSION }}
needs:
[
build-rust-ubuntu,
Expand All @@ -104,11 +91,6 @@ jobs:
benchmarks,
]

env:
PLATFORM: x64
FRAMEWORK: net6.0
DOTNET_INSTALL_DIR: "./.dotnet"

steps:
- name: Set Debug Configuration
if: ${{ github.ref=='refs/heads/main' }}
Expand All @@ -131,27 +113,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup dotnet
uses: actions/[email protected]
with:
dotnet-version: 6.0.x

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64

- name: Install minver cli
run: dotnet tool install minver-cli --global
shell: pwsh

- name: Set HYPERLIGHT_VERSION
if: ${{ contains(github.ref, 'refs/heads/release/') }}
id: set_hyperlight_version
run: |
git fetch --tags
minver -vd -tv -p preview -a minor
echo "HYPERLIGHT_VERSION=$(minver -vd -tv -p preview -a minor)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
echo "HYPERLIGHT_VERSION=$(minver -vd -tv -p preview -a minor)" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf-8 -Append
$version="${{ github.ref }}"
$version=$version -replace "refs/heads/release/v", ""
echo "HYPERLIGHT_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
echo "HYPERLIGHT_VERSION=$Env:HYPERLIGHT_VERSION"
shell: pwsh

- name: Ensure path exists for debug build
Expand Down Expand Up @@ -183,17 +153,6 @@ jobs:
just tar-headers
just tar-static-lib
- name: Determine if we should publish github packages
run: |
echo "github.ref=${{ github.ref }}"
echo "HYPERLIGHT_VERSION=$Env:HYPERLIGHT_VERSION"
if (('${{ github.ref }}'.contains('refs/heads/release')) -or
(('${{ github.ref }}'.contains('refs/heads/main')) -and
($Env:HYPERLIGHT_VERSION.contains('-preview')))) {
echo "Setting SHOULD_PUBLISH in GITHUB_ENV"
echo "SHOULD_PUBLISH=true" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
}
- name: Download benchmarks (Windows)
uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit 89f5fb5

Please sign in to comment.