Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Apr 12, 2024
1 parent a5b437f commit 65758d7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
Expand All @@ -26,3 +23,8 @@ jobs:
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: otpnet-nuget-package
path: src/Otp.NET/bin/Debug/*.nupkg
32 changes: 32 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Upload dotnet package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

permissions:
packages: write
contents: read

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Publish to nuget.org
run: dotnet nuget push src/Otp.NET/bin/Release/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: otpnet-nuget-package
path: src/Otp.NET/bin/Release/*.nupkg

0 comments on commit 65758d7

Please sign in to comment.