diff --git a/.github/workflows/publish-beta.yml b/.github/workflows/publish-beta.yml
new file mode 100644
index 0000000..152581f
--- /dev/null
+++ b/.github/workflows/publish-beta.yml
@@ -0,0 +1,28 @@
+name: publish-beta
+
+on:
+ push:
+ branches: [ master ]
+
+jobs:
+ build-publish:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.x
+ include-prerelease: true
+ - name: Restore
+ run: |
+ dotnet restore NewLife.RocketMQ/NewLife.RocketMQ.csproj
+ - name: Build
+ run: |
+ dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d-beta%H%M") -o out NewLife.RocketMQ/NewLife.RocketMQ.csproj
+ - name: Publish
+ run: |
+ dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
+ dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.nugetKey }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..cdbcdb8
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,28 @@
+name: publish
+
+on:
+ push:
+ tags: [ v* ]
+
+jobs:
+ build-publish:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.0.x
+ include-prerelease: true
+ - name: Restore
+ run: |
+ dotnet restore NewLife.RocketMQ/NewLife.RocketMQ.csproj
+ - name: Build
+ run: |
+ dotnet pack --no-restore --version-suffix $(date "+%Y.%m%d") -o out NewLife.RocketMQ/NewLife.RocketMQ.csproj
+ - name: Publish
+ run: |
+ dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://nuget.pkg.github.com/NewLifeX/index.json --api-key ${{ github.token }}
+ dotnet nuget push ./out/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.nugetKey }}
diff --git a/NewLife.RocketMQ/NewLife.RocketMQ.csproj b/NewLife.RocketMQ/NewLife.RocketMQ.csproj
index f884d19..4019c72 100644
--- a/NewLife.RocketMQ/NewLife.RocketMQ.csproj
+++ b/NewLife.RocketMQ/NewLife.RocketMQ.csproj
@@ -7,9 +7,11 @@
<Description>纯托管轻量级RocketMQ客户端,支持发布消息、消费消息、负载均衡等核心功能!旧版NET45请找2021年</Description>
<Company>新生命开发团队</Company>
<Copyright>©2002-2022 NewLife</Copyright>
- <Version>2.0.2022.0304</Version>
- <FileVersion>2.0.2022.0304</FileVersion>
- <AssemblyVersion>2.0.*</AssemblyVersion>
+ <VersionPrefix>2.0</VersionPrefix>
+ <VersionSuffix>$([System.DateTime]::Now.ToString(`yyyy.MMdd`))</VersionSuffix>
+ <Version>$(VersionPrefix).$(VersionSuffix)</Version>
+ <FileVersion>$(Version)</FileVersion>
+ <AssemblyVersion>$(VersionPrefix).*</AssemblyVersion>
<Deterministic>false</Deterministic>
<OutputPath>..\Bin</OutputPath>
<DocumentationFile>$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>