From 14779f6827e84a69ac95f2e66f7c77d6611fd8af Mon Sep 17 00:00:00 2001 From: Yaohui Liu Date: Sat, 6 May 2023 13:01:20 +0800 Subject: [PATCH] ci: update release ci. --- .github/workflows/release.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 862c5d00..eb983e1c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,24 +12,24 @@ env: jobs: build: - if: contains(github.event.pull_request.labels.*.name, 'auto-release') && ${{ github.event.pull_request.merged }} + if: contains(github.event.pull_request.labels.*.name, 'auto-release') runs-on: windows-latest steps: - uses: actions/checkout@v3 - - name: Setup .NET 6.0.x SDK - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.0.x + # - name: Setup .NET 6.0.x SDK + # uses: actions/setup-dotnet@v3 + # with: + # dotnet-version: 6.0.x - - name: Check .NET info - run: dotnet --info + # - name: Check .NET info + # run: dotnet --info - - name: Install dependencies - run: dotnet restore + # - name: Install dependencies + # run: dotnet restore - - name: Build solution - run: dotnet build -c Release --no-restore + # - name: Build solution + # run: dotnet build -c Release --no-restore # run-semantic-release: # runs-on: ubuntu-latest @@ -72,8 +72,9 @@ jobs: git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"; git fetch origin; $LastTag = git describe --tags; + $LastTag = ($LastTag).TrimStart('v'); echo "Last tag is: $LastTag"; - $Version = ($LastTag).TrimStart('v') + "-preview"; + $Version = ${LastTag%%-*} + "-preview"; echo "Publishing version: $Version"; dotnet pack ./src/TensorFlowNET.Core/Tensorflow.Binding.csproj -c Release -o packages /p:PackageVersion=$Version /p:Version=$Version; dotnet pack ./src/TensorFlowNET.Keras/Tensorflow.Keras.csproj -c Release -o packages /p:PackageVersion=$Version /p:Version=$Version;