Skip to content

Commit

Permalink
Update netcore.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
L3tum authored Oct 18, 2019
1 parent 64709ab commit 3c28784
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/netcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: push

jobs:
build:
runs-on: windows-latest
runs-on: ubuntu-18.04
strategy:
matrix:
dotnet: [ '3.0.100' ]
Expand All @@ -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"

0 comments on commit 3c28784

Please sign in to comment.