forked from AnthonyPython/Datamodel.NET
-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (30 loc) · 855 Bytes
/
Copy pathrelease.yml
File metadata and controls
35 lines (30 loc) · 855 Bytes
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
name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+*"
- "v[0-9]+.[0-9]+*"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
- name: Test
run: dotnet test -c Release
- name: Pack
run: dotnet pack Datamodel.NET/Datamodel.NET.csproj -c Release -o out
# Kept next to the push: the issued key is only valid for an hour.
- name: NuGet login
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push
run: dotnet nuget push "out/*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate