NewLife/AntJob

beta
大石头 authored at 2024-06-20 19:38:10 大石头 committed at 2024-06-20 19:38:25
e489616
Tree
1 Parent(s) 5c87512
Summary: 2 changed files with 8 additions and 4 deletions.
Modified +4 -2
Modified +4 -2
Modified +4 -2
diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml
index ab389ec..a746a37 100644
--- a/.github/workflows/publish-beta.yml
+++ b/.github/workflows/publish-beta.yml
@@ -26,10 +26,12 @@ jobs:
           6.0.x
           7.0.x
           8.x
+    - name: Get Version
+      run: echo "VERSION=$(date '+%Y.%m%d-beta%H%M')" >> $GITHUB_ENV
     - name: Build
       run: |
-        dotnet pack -c Release -o out AntJob/AntJob.csproj
-        dotnet pack -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
+        dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob/AntJob.csproj
+        dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
     - name: Publish
       run: |
         dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
Modified +4 -2
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index d3a2330..04e580f 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -18,10 +18,12 @@ jobs:
           6.0.x
           7.0.x
           8.x
+    - name: Get Version
+      run: echo "VERSION=$(date '+%Y.%m%d')" >> $GITHUB_ENV
     - name: Build
       run: |
-        dotnet pack -c Release -o out AntJob/AntJob.csproj
-        dotnet pack -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
+        dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob/AntJob.csproj
+        dotnet pack --version-suffix ${{ env.VERSION }} -c Release -o out AntJob.Extensions/AntJob.Extensions.csproj
     - name: Publish
       run: |
         dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}