push to new nuget
All checks were successful
Release / Get Version (push) Successful in 5s
Release / Build and Publish Nuget (Torch.API) (push) Successful in 2m0s
Release / Build and Publish Nuget (Torch) (push) Successful in 3m6s
Release / Build and Publish Nuget (Torch.Server) (push) Successful in 3m29s
Release / Build and Publish Package (push) Successful in 4m59s
All checks were successful
Release / Get Version (push) Successful in 5s
Release / Build and Publish Nuget (Torch.API) (push) Successful in 2m0s
Release / Build and Publish Nuget (Torch) (push) Successful in 3m6s
Release / Build and Publish Nuget (Torch.Server) (push) Successful in 3m29s
Release / Build and Publish Package (push) Successful in 4m59s
This commit is contained in:
39
.github/workflows/release.yaml
vendored
39
.github/workflows/release.yaml
vendored
@@ -5,7 +5,6 @@ on:
|
||||
branches: [master]
|
||||
|
||||
env:
|
||||
BUILD_CONFIGURATION: Release
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
@@ -33,36 +32,24 @@ jobs:
|
||||
name: Build and Publish Nuget
|
||||
runs-on: ubuntu-latest
|
||||
needs: [get-version]
|
||||
strategy:
|
||||
matrix:
|
||||
project: [ Torch.API, Torch, Torch.Server ]
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
name: Checkout
|
||||
|
||||
- uses: actions/setup-dotnet@v3
|
||||
- uses: actions/setup-dotnet@v4
|
||||
name: Setup dotnet
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore Torch.Server/Torch.Server.csproj --locked-mode
|
||||
run: dotnet restore ${{ matrix.project }}/${{ matrix.project }}.csproj --locked-mode
|
||||
|
||||
- name: Build
|
||||
run: dotnet build Torch.Server/Torch.Server.csproj --no-restore -c ${{ env.BUILD_CONFIGURATION }} -p:Version="${{ needs.get-version.outputs.version }}" -p:AssemblyVersion="${{ needs.get-version.outputs.version }}"
|
||||
|
||||
- run: dotnet pack -c Release ./Torch.API/Torch.API.csproj -o pack -p:Version="${{ needs.get-version.outputs.version }}" -p:AssemblyVersion="${{ needs.get-version.outputs.version }}" --no-build
|
||||
- run: dotnet pack -c Release ./Torch/Torch.csproj -o pack -p:Version="${{ needs.get-version.outputs.version }}" -p:AssemblyVersion="${{ needs.get-version.outputs.version }}" --no-build
|
||||
- run: dotnet pack -c Release ./Torch.Server/Torch.Server.csproj -o pack -p:Version="${{ needs.get-version.outputs.version }}" -p:AssemblyVersion="${{ needs.get-version.outputs.version }}" --no-build
|
||||
|
||||
- name: Install Sleet
|
||||
run: dotnet tool install -g sleet --version 5.1.3
|
||||
- name: Push Nuget Package
|
||||
env:
|
||||
SLEET_FEED_TYPE: s3
|
||||
SLEET_FEED_PATH: https://nuget.storage.yandexcloud.net
|
||||
SLEET_FEED_BUCKETNAME: nuget
|
||||
SLEET_FEED_SERVICEURL: https://storage.yandexcloud.net
|
||||
SLEET_FEED_ACCESSKEYID: ${{ secrets.S3_KEY_ID }}
|
||||
SLEET_FEED_SECRETACCESSKEY: ${{ secrets.S3_KEY }}
|
||||
run: /root/.dotnet/tools/sleet push ./pack
|
||||
- name: Pack
|
||||
run: dotnet pack ${{ matrix.project }}/${{ matrix.project }}.csproj -o pack --no-restore -p:Version="${{ needs.get-version.outputs.version }}" -p:AssemblyVersion="${{ needs.get-version.outputs.version }}"
|
||||
|
||||
- name: Push
|
||||
run: dotnet nuget push -s https://ng.zznty.ru/v3/index.json -k ${{ secrets.NUGET_API_KEY }} ./pack/${{ matrix.project }}.${{ needs.get-version.outputs.version }}.nupkg
|
||||
|
||||
build:
|
||||
name: Build and Publish Package
|
||||
@@ -72,16 +59,14 @@ jobs:
|
||||
- uses: actions/checkout@master
|
||||
name: Checkout
|
||||
|
||||
- uses: actions/setup-dotnet@v3
|
||||
- uses: actions/setup-dotnet@v4
|
||||
name: Setup dotnet
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore Torch.Server/Torch.Server.csproj --locked-mode -r win-x64
|
||||
|
||||
- name: Publish
|
||||
run: dotnet publish Torch.Server/Torch.Server.csproj --no-restore --sc -r win-x64 -c ${{ env.BUILD_CONFIGURATION }} -o ./publish -p:Version="${{ needs.get-version.outputs.version }}" -p:AssemblyVersion="${{ needs.get-version.outputs.version }}"
|
||||
run: dotnet publish Torch.Server/Torch.Server.csproj --no-restore --sc -r win-x64 -o ./publish -p:Version="${{ needs.get-version.outputs.version }}" -p:AssemblyVersion="${{ needs.get-version.outputs.version }}"
|
||||
|
||||
- uses: vimtor/action-zip@v1
|
||||
name: Zip Release
|
||||
|
7
global.json
Normal file
7
global.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "8.0.0",
|
||||
"rollForward": "latestFeature",
|
||||
"allowPrerelease": false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user