-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.15 KB
/
Copy pathpublish-stringfunctions.yml
File metadata and controls
51 lines (41 loc) · 1.15 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
name: Publish StringFunctions package
on:
workflow_dispatch:
push:
tags:
- 'stringfunctions-v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
- name: Restore
run: dotnet restore ./StringFunctions.sln
- name: Test
run: dotnet test ./StringFunctions.sln -c Release --no-restore
- name: Pack
run: dotnet pack ./StringFunctions/StringFunctions.csproj -c Release --no-restore -o ./artifacts
- name: NuGet login (OIDC)
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push package to nuget.org
run: |
dotnet nuget push "./artifacts/*.nupkg" \
--source "https://api.nuget.org/v3/index.json" \
--api-key "${{ steps.login.outputs.NUGET_API_KEY }}" \
--skip-duplicate