-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.79 KB
/
Copy pathci.yml
File metadata and controls
61 lines (48 loc) · 1.79 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
permissions:
contents: read
actions: read
checks: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Restore
run: dotnet restore src/DiffLog.csproj
- name: Build
run: dotnet build src/DiffLog.csproj -c Release --no-restore -p:CommitHash=${{ github.sha }}
- name: Pack (verify)
run: dotnet pack src/DiffLog.csproj -c Release --no-build -o ./artifacts -p:CommitHash=${{ github.sha }}
- name: Install DiffLog
if: matrix.os == 'ubuntu-latest'
run: dotnet tool install -g DiffLog
- name: Generate Release Notes Preview
if: matrix.os == 'ubuntu-latest'
env:
OPENAI_API_KEY: ${{ secrets.OPEN_AI_API_KEY }}
run: |
difflog generate --system-prompt "Generate developer friendly release notes based on this git history information. Include SHA hashes and structure the changelog in bullet points. don't make it too long. keep it clean." --print
- name: Upload artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: ./artifacts/*.nupkg