-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.78 KB
/
deploy_to_nuget.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Deploy to NuGet
on:
workflow_dispatch:
push:
branches:
- master
- iss-1
pull_request:
types: [ closed ]
jobs:
release:
# if: github.event.pull_request.merged == true
name: Release Using Release Please
runs-on: ubuntu-24.04
strategy:
matrix:
dotnet-version: [6.0]
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Set up .NET
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
cache: true
cache-dependency-path: "./UrlboxSDK"
# Restore dependencies
- name: Restore dependencies
run: dotnet restore ./UrlboxSDK
# Run tests
- name: Run tests
run: dotnet test
# https://github.com/googleapis/release-please/blob/72b0ab360c3d6635397e8b02f4d3f9f53932e23c/docs/customizing.md
- name: Create Release
uses: googleapis/release-please-action@v4
with:
target-branch: release-please-test
# deploy:
# needs: release
# if: ${{ needs.release.outputs.release_created == true }}
# name: Deploy to NuGet
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# dotnet-version: [6.0]
# steps:
# # Build the project
# - name: Build the project
# run: dotnet build ./UrlboxSDK --configuration Release --no-restore
# # Pack the NuGet package somewhere unique
# - name: Pack NuGet package
# run: dotnet pack --configuration Release --no-build --output ./package
# # Push the NuGet package to NuGet.org
# - name: Publish to NuGet
# run: dotnet nuget push "./package/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json