-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (25 loc) · 1.2 KB
/
nuget-source-generator.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Publish source generator project to Github Packages
on:
push:
branches:
- main
paths:
- src/MinimalUtility.SourceGenerator/**
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-dotnet@v4.2.0
with:
dotnet-version: 8.0.x
- run: dotnet restore src/MinimalUtility.SourceGenerator/MinimalUtility.SourceGenerator.csproj
- run: dotnet build src/MinimalUtility.SourceGenerator/MinimalUtility.SourceGenerator.csproj --configuration Release --no-restore
- run: dotnet pack src/MinimalUtility.SourceGenerator/MinimalUtility.SourceGenerator.csproj --configuration Release -o src/MinimalUtility.SourceGenerator/artifacts/
- run: |
dotnet nuget add source --username kochounoyume --password ${{ secrets.GH_PACKAGES_PAT }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/kochounoyume/index.json"
dotnet nuget push "src/MinimalUtility.SourceGenerator/artifacts/*.nupkg" --api-key ${{ secrets.GH_PACKAGES_PAT }} --source "github" --skip-duplicate