Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
nuget 패키지 자동으로 만들기
  • Loading branch information
614project authored Aug 26, 2024
1 parent 72dad4b commit 6b994de
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish NuGet Package

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x' # 필요한 .NET 버전으로 설정

- name: Restore dependencies
run: dotnet restore

- name: Build the project
run: dotnet build --configuration Release --no-restore

- name: Pack the project
run: dotnet pack --configuration Release --no-build --output ./nupkg

- name: Publish to NuGet
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 comments on commit 6b994de

Please sign in to comment.