From e2e258a1aac3399b408837de7cf8b139ae40f71a Mon Sep 17 00:00:00 2001 From: Marko Lahma Date: Mon, 2 Aug 2021 19:03:01 +0300 Subject: [PATCH] use separate publish task --- .github/workflows/ci.yml | 9 --------- .github/workflows/publish.yml | 36 +++++++---------------------------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1b364ea..11ba8e56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,12 +30,3 @@ jobs: - name: Run './build.cmd ci' run: ./build.sh ci - publish: - runs-on: ubuntu-latest - needs: [ build-windows, build-linux ] - steps: - - uses: actions/checkout@v2 - - name: Publish - run: ./build.sh publish - env: - NuGetApiKey: ${{ secrets.NUGET_API_KEY }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a6216779..ab36317d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,34 +6,12 @@ on: - 'v*.*.*' jobs: - build: - - runs-on: ubuntu-latest - env: - DOTNET_NOLOGO: true - DOTNET_CLI_TELEMETRY_OPTOUT: 1 + publish: + runs-on: windows-latest steps: - - name: Checkout source code - uses: actions/checkout@v2 - - - name: Setup dotnet 2.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 2.1.* - - - name: Setup dotnet 3.1 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.* - - - name: Setup dotnet 5.0 - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 5.0.* - - - name: Test - run: ./build.cmd ci test pack - - - name: Push with dotnet - run: dotnet nuget push artifacts/*.*nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json \ No newline at end of file + - uses: actions/checkout@v2 + - name: Publish + run: ./build.sh test publish + env: + NuGetApiKey: ${{ secrets.NUGET_API_KEY }}