-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.61 KB
/
release-please.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: release-please
on:
push:
branches:
- main
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: release-please
id: release
uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.RELEASE_PLEASE_PAT }}
- name: 🛒 Checkout repository
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_PLEASE_PAT }}
- name: ⚙️ Setup dotnet 8.0.x
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: 🧹 Clean
if: ${{ steps.release.outputs.release_created }}
run: dotnet clean -c Release && dotnet nuget locals all --clear
- name: 🔁 Restore packages
if: ${{ steps.release.outputs.release_created }}
run: dotnet restore
- name: 🛠️ Building library in release mode
if: ${{ steps.release.outputs.release_created }}
run: dotnet build -c Release --no-restore /p:UseSourceLink=true
- name: 🗳️ Creating library package for release
if: ${{ steps.release.outputs.release_created }}
run: dotnet pack -c Release --no-restore -o ${GITHUB_WORKSPACE}/packages /p:PublicRelease=true
- name: 📦 Push packages to NuGet
if: ${{ steps.release.outputs.release_created }}
run: |
dotnet nuget push ${GITHUB_WORKSPACE}/packages/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols