Skip to content

Commit

Permalink
Add github nuget package publish action (#24)
Browse files Browse the repository at this point in the history
* Add github nuget package publish action

* Specify Github nuget source
  • Loading branch information
devodo authored Aug 27, 2022
1 parent e964740 commit 2170652
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: package

on:
push:
tags:
- 'v*.*.*'

jobs:
linux-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal -f net6.0
- name: Pack DivertR
run: dotnet pack --configuration Release --output ./artifacts ./src/DivertR/DivertR.csproj
- name: Nuget Push
run: dotnet nuget push ./artifacts/*.nupkg --source "https://nuget.pkg.github.com/devodo/index.json" --api-key ${{ secrets.PACKAGE_REPOSITORY_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: publish
on:
push:
tags:
- 'v*.*.*'
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
linux-build:
Expand Down

0 comments on commit 2170652

Please sign in to comment.