Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a5cc132151 | ||
![]() |
92dea1986c | ||
![]() |
c03eb79f81 | ||
![]() |
0ee9c5f97c |
15
.github/workflows/release.yaml
vendored
15
.github/workflows/release.yaml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
TORCH_VERSION: ${{ github.ref_name }}
|
||||
BUILD_CONFIGURATION: Release
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
@@ -31,10 +31,15 @@ jobs:
|
||||
run: dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore Torch.Server/Torch.Server.csproj --use-lock-file
|
||||
- uses: bhowell2/github-substring-action
|
||||
id: normalize_version
|
||||
with:
|
||||
value: ${{ env.TORCH_VERSION }}
|
||||
index_of_str: "v"
|
||||
- name: Build
|
||||
run: dotnet build Torch.Server/Torch.Server.csproj --no-restore -c $env:BUILD_CONFIGURATION /p:AssemblyVersion=$env:VERSION /p:Version=$env:VERSION
|
||||
run: dotnet build Torch.Server/Torch.Server.csproj --no-restore -c ${{ env.BUILD_CONFIGURATION }} /p:AssemblyVersion=${{ env.TORCH_VERSION }} /p:Version=${{ steps.normalize_version.outputs.substring }}
|
||||
- name: Publish
|
||||
run: dotnet publish Torch.Server/Torch.Server.csproj --no-build -r win-x64 --sc -c $env:BUILD_CONFIGURATION -o ./publish
|
||||
run: dotnet publish Torch.Server/Torch.Server.csproj --no-build -r win-x64 --sc -c ${{ env.BUILD_CONFIGURATION }} -o ./publish
|
||||
- uses: vimtor/action-zip@v1
|
||||
name: Zip Release
|
||||
with:
|
||||
@@ -53,8 +58,8 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ env.VERSION }}
|
||||
release_name: Release v${{ env.VERSION }}
|
||||
tag_name: ${{ env.TORCH_VERSION }}
|
||||
release_name: Release v${{ env.TORCH_VERSION }}
|
||||
body: ${{ steps.github_release.outputs.changelog }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
|
Reference in New Issue
Block a user