From 3c28784585be392ad59aacfc8328d3c97569e627 Mon Sep 17 00:00:00 2001 From: L3tum <9307432+L3tum@users.noreply.github.com> Date: Fri, 18 Oct 2019 11:53:29 +0200 Subject: [PATCH] Update netcore.yml --- .github/workflows/netcore.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/netcore.yml b/.github/workflows/netcore.yml index 49fe621..b1f2cf5 100644 --- a/.github/workflows/netcore.yml +++ b/.github/workflows/netcore.yml @@ -4,7 +4,7 @@ on: push jobs: build: - runs-on: windows-latest + runs-on: ubuntu-18.04 strategy: matrix: dotnet: [ '3.0.100' ] @@ -15,20 +15,14 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ matrix.dotnet }} - - run: echo $(date "+%Y.%-m.%-d") > .\version - - run: echo ${{ github.ref }} | %{$_ -replace "refs/tags/",""} > .\version + - run: echo $(date "+%Y.%-m.%-d") > ./version + - run: echo ${{ github.ref }} > ./version && sed -ie 's/refs\/tags\///' ./version if: startsWith(github.ref, 'refs/tags/') - name: Build - run: dotnet pack -c Release --include-symbols -p:PackageVersion=$(cat ./version) --output nupkgs ".\HardwareInformation\HardwareInformation.csproj" + run: dotnet pack -c Release --include-symbols -p:PackageVersion=$(cat ./version) --output nupkgs "./HardwareInformation.sln" - name: Nuget release if: startsWith(github.ref, 'refs/tags/') - run: dotnet nuget push nupkgs\HardwareInformation.$(cat .\version).nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json - - name: Install NuGet client - if: startsWith(github.ref, 'refs/tags/') - uses: warrenbuckley/Setup-Nuget@v1 - - name: Add Github Packages Registry - if: startsWith(github.ref, 'refs/tags/') - run: nuget sources Add -Name "GPR" -Source "https://nuget.pkg.github.com/L3tum/index.json" -UserName L3tum -Password ${{ secrets.GITHUB_TOKEN }} + run: dotnet nuget push nupkgs/HardwareInformation.$(cat ./version).nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json - name: Github Package Release if: startsWith(github.ref, 'refs/tags/') - run: nuget push nupkgs\HardwareInformation.$(cat .\version).nupkg -s "GPR" + run: dotnet nuget push nupkgs/HardwareInformation.$(cat ./version).nupkg -k L3tum:${{ secrets.GITHUB_TOKEN }} -s "https://nuget.pkg.github.com/L3tum/index.json"