diff --git a/.github/workflows/package_push_server.yml b/.github/workflows/package_push_server.yml new file mode 100644 index 00000000..2665faa4 --- /dev/null +++ b/.github/workflows/package_push_server.yml @@ -0,0 +1,43 @@ +name: Package Push Nuget +on: + push: + branches: + - 'server/base' + workflow_dispatch: + +jobs: + package-push: + name: package push + runs-on: ubuntu-latest + steps: + - name: git pull + uses: actions/checkout@v2 + + - name: checkout server/base branch + run: git checkout server/base + + - name: setting dotnet version + uses: actions/setup-dotnet@v1 + with: + dotnet-version: | + 6.0.x + 7.0.x + 8.0.x + include-prerelease: true + + - name: restore + run: dotnet restore + + - name: build + run: dotnet build src/Masa.Stack.Components/Masa.Stack.Components.csproj --configuration Release --no-restore /p:ContinuousIntegrationBuild=true + + - name: pack + run: | + # 使用符合 NuGet 规范的版本号格式 + # 主版本.次版本.修订版本-预发布标识符(必须以字母开头) + DATE=$(date +'%y%m%d') + TIME=$(date +'%H%M') + dotnet pack --configuration Release --include-symbols -p:PackageVersion=0.0.488-build$DATE$TIME + + - name: package push + run: dotnet nuget push "**/*.symbols.nupkg" -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json