Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaccount committed May 29, 2024
2 parents 427352f + 638cbe6 commit f4de9f6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/relase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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: Publish NuGet Package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 2.1
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore

- name: Pack
run: dotnet pack --no-build --configuration Release
- name: Push NuGet package
run: dotnet nuget push **/*.nupkg --source "nuget.org" --configfile nuget.config
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
9 changes: 9 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
<apikeys>
<add key="nuget.org" value="%NUGET_API_KEY%" />
</apikeys>
</configuration>

0 comments on commit f4de9f6

Please sign in to comment.