name: Torch Server Package on: workflow_dispatch: permissions: packages: write jobs: Main: name: Build Nuget Package runs-on: ubuntu-latest steps: - uses: actions/checkout@master - uses: actions/setup-dotnet@v3 with: dotnet-version: '7.0.x' - name: Download Dlls run: mkdir torch && wget --content-disposition --trust-server-names -P torch/ https://build.torchapi.com/job/Torch/job/master/lastSuccessfulBuild/artifact/bin/x64/Release/Torch.API.dll https://build.torchapi.com/job/Torch/job/master/lastSuccessfulBuild/artifact/bin/x64/Release/Torch.dll https://build.torchapi.com/job/Torch/job/master/lastSuccessfulBuild/artifact/bin/x64/Release/Torch.Server.exe https://build.torchapi.com/job/Torch/job/master/lastSuccessfulBuild/artifact/bin/x64/Release/Torch.API.xml https://build.torchapi.com/job/Torch/job/master/lastSuccessfulBuild/artifact/bin/x64/Release/Torch.xml https://build.torchapi.com/job/Torch/job/master/lastSuccessfulBuild/artifact/bin/x64/Release/Torch.Server.xml - name: Fix Torch.Server extension run: mv torch/Torch.Server.exe torch/Torch.Server.dll - name: Prepare folder structure run: mkdir -p ./nuget/lib/net48 - name: Copy binaries run: cp ./torch/* ./nuget/lib/net48 - name: Get Torch version id: torch_version run: echo "::set-output name=version::1.3.1.$(wget -qO- https://build.torchapi.com/job/Torch/job/master/lastSuccessfulBuild/buildNumber)-master" - name: Create Nuget Package run: nuget pack specs/Torch.Server.ReferenceAssemblies.nuspec -BasePath ./nuget -Version ${{ steps.torch_version.outputs.version }} -NonInteractive -NoPackageAnalysis -OutputFileNamesWithoutVersion - 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: sleet push ./Torch.Server.ReferenceAssemblies.nupkg