Skip to content

Commit 89f5fb5

Browse files
authored
Merge pull request #20 from hyperlight-dev/update-create-release
Update CreateRelease workflow
2 parents 5d03294 + c414a41 commit 89f5fb5

File tree

1 file changed

+6
-47
lines changed

1 file changed

+6
-47
lines changed

.github/workflows/CreateRelease.yml

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ on:
99

1010
permissions:
1111
contents: write
12-
packages: write # This is needed to publish nuget packages
13-
id-token: write # Needed for federated auth to our ADO feeds
14-
pull-requests: read
12+
id-token: write
1513

1614
jobs:
1715

@@ -23,15 +21,6 @@ jobs:
2321
steps:
2422
- uses: actions/checkout@v4
2523

26-
- name: Install az-cli (Linux mariner) (move into hyperlight-workflow-setup!)
27-
if: ${{ (runner.os == 'Linux') }}
28-
run: |
29-
if command -v dnf > /dev/null 2>&1; then
30-
sudo dnf install azure-cli -y
31-
fi
32-
shell: bash
33-
34-
3524
- uses: hyperlight-dev/[email protected]
3625
with:
3726
rust-toolchain: "1.81.0"
@@ -94,8 +83,6 @@ jobs:
9483
# see https://github.com/orgs/community/discussions/26286#discussioncomment-3251208 for why we need to check the ref
9584
if: ${{ contains(github.ref, 'refs/heads/release/') }} || ${{ github.ref=='refs/heads/main' }}
9685
runs-on: windows-2022
97-
outputs:
98-
HYPERLIGHT_VERSION: ${{ steps.set_hyperlight_version.outputs.HYPERLIGHT_VERSION }}
9986
needs:
10087
[
10188
build-rust-ubuntu,
@@ -104,11 +91,6 @@ jobs:
10491
benchmarks,
10592
]
10693

107-
env:
108-
PLATFORM: x64
109-
FRAMEWORK: net6.0
110-
DOTNET_INSTALL_DIR: "./.dotnet"
111-
11294
steps:
11395
- name: Set Debug Configuration
11496
if: ${{ github.ref=='refs/heads/main' }}
@@ -131,27 +113,15 @@ jobs:
131113
env:
132114
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
133115

134-
- name: Setup dotnet
135-
uses: actions/[email protected]
136-
with:
137-
dotnet-version: 6.0.x
138-
139-
- name: Add msbuild to PATH
140-
uses: microsoft/setup-msbuild@v2
141-
with:
142-
msbuild-architecture: x64
143-
144-
- name: Install minver cli
145-
run: dotnet tool install minver-cli --global
146-
shell: pwsh
147-
148116
- name: Set HYPERLIGHT_VERSION
117+
if: ${{ contains(github.ref, 'refs/heads/release/') }}
149118
id: set_hyperlight_version
150119
run: |
151120
git fetch --tags
152-
minver -vd -tv -p preview -a minor
153-
echo "HYPERLIGHT_VERSION=$(minver -vd -tv -p preview -a minor)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
154-
echo "HYPERLIGHT_VERSION=$(minver -vd -tv -p preview -a minor)" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf-8 -Append
121+
$version="${{ github.ref }}"
122+
$version=$version -replace "refs/heads/release/v", ""
123+
echo "HYPERLIGHT_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
124+
echo "HYPERLIGHT_VERSION=$Env:HYPERLIGHT_VERSION"
155125
shell: pwsh
156126

157127
- name: Ensure path exists for debug build
@@ -183,17 +153,6 @@ jobs:
183153
just tar-headers
184154
just tar-static-lib
185155
186-
- name: Determine if we should publish github packages
187-
run: |
188-
echo "github.ref=${{ github.ref }}"
189-
echo "HYPERLIGHT_VERSION=$Env:HYPERLIGHT_VERSION"
190-
if (('${{ github.ref }}'.contains('refs/heads/release')) -or
191-
(('${{ github.ref }}'.contains('refs/heads/main')) -and
192-
($Env:HYPERLIGHT_VERSION.contains('-preview')))) {
193-
echo "Setting SHOULD_PUBLISH in GITHUB_ENV"
194-
echo "SHOULD_PUBLISH=true" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
195-
}
196-
197156
- name: Download benchmarks (Windows)
198157
uses: actions/download-artifact@v4
199158
with:

0 commit comments

Comments
 (0)