Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nugetパッケージを公開できるようymlファイルを修正 #29

Merged
merged 1 commit into from
Jan 14, 2025
Merged
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
28 changes: 9 additions & 19 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,14 @@ jobs:
- name: Build
run: dotnet build ${{env.SolutionPath}} --no-restore

# ReviewFileを公開する
# PROJECT_FILE_PATH:公開するプロジェクトのパス
# VERSION_REGEX:公開する際のバージョン(下記は正規表現でcsproj内のPackageVersionタグを取得している)
# TAG_FORMAT:gitのタグのフォーマット
# NUGET_KEY:Nugetへの認証に必要なトークンを指定する
- name: Publish to ReviewFile
uses: brandedoutcast/publish-nuget@v2
with:
PROJECT_FILE_PATH: src/ReviewFile/ReviewFile.csproj
VERSION_REGEX: '^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$'
TAG_FORMAT: '*'
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# ReviewFileをパッケージ化する
- name: Package ReviewFile
run: dotnet pack -c Release -o . src/ReviewFile/ReviewFile.csproj

# ReviewFileToJsonServiceをパッケージ化する
- name: Package ReviewFileToJsonService
run: dotnet pack -c Release -o . src/ReviewFileToJsonService/ReviewFileToJsonService.csproj

# ReviewFileToJsonServiceを公開する
# パッケージ化されたReviewFileおよびReviewFileToJsonServiceを公開する
- name: Publish to ReviewFileToJsonService
uses: brandedoutcast/publish-nuget@v2
with:
PROJECT_FILE_PATH: src/ReviewFileToJsonService/ReviewFileToJsonService.csproj
VERSION_REGEX: '^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$'
TAG_FORMAT: '*'
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
run: dotnet nuget push *.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json