Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/dotnet-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Nuget 빌드 자동스크립트 Doc


## Step1 : 닷넷 빌드

dotnet restore Src/LineDevelopers/LineDevelopers.csproj

dotnet build Src/LineDevelopers/LineDevelopers.csproj --configuration Release --no-restore


## Step2 : Nuget Push

dotnet nuget push Src/LineDevelopers/bin/Release/LineDevelopers.1.0.0.nupkg -k ${{ secrets.NUGET_PUBLIC }} --source "https://api.nuget.org/v3/index.json"


## Nuget 키 등록방법

경로 : Project - Setting - Secrets and variables

Name : NUGET_PUBLIC

|Name|Secret|
|NUGET_PUBLIC|Your Key|


## 태깅규칙

v1.0.0 과 같이 Gthub 태깅을 딸때 작동되며, 해당버전은 NUGET 패키지버전과 일치가 됩니다.

닷넷빌드의 버전과 일치가 되게됨으로 , 태깅을 따기전 빌드의 버전을 맞춰주세요


|태깅버전|바이너리버전|
|v1.0.0|1.0.0|
28 changes: 28 additions & 0 deletions .github/workflows/dotnet-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: .NET Core

on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*.*.*' # v1.0.0 과같이 태깅을 달면 배포가 작동됩니다.
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.306
- name: Install dependencies
run: dotnet restore Src/LineDevelopers/LineDevelopers.csproj
- name: Build
run: dotnet build Src/LineDevelopers/LineDevelopers.csproj --configuration Release --no-restore
- name: Push Nuget registry
run: dotnet nuget push Src/LineDevelopers/bin/Release/LineDevelopers.$(git describe --tags | sed s/[v]//g).nupkg -k ${{ secrets.NUGET_PUBLIC }} --source "https://api.nuget.org/v3/index.json"
1 change: 1 addition & 0 deletions Src/LineDevelopers/LineDevelopers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<PackageTags>LINE;LINE Message;Chatbot</PackageTags>
<RepositoryType>git</RepositoryType>
<RootNamespace>Line</RootNamespace>
<Version>1.0.1</Version>
</PropertyGroup>

</Project>