-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 985 Bytes
/
publish.yml
File metadata and controls
40 lines (31 loc) · 985 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
36
37
38
39
40
name: Publish
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+"
permissions:
contents: write
jobs:
publish:
if: github.repository == 'rameel/ramstack.expressionparser'
name: Publish packages
runs-on: ubuntu-latest
steps:
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Checkout
uses: actions/checkout@v4
- name: Build Solution
run: dotnet build -c Release
- name: Create NuGet Packages
run: dotnet pack -c Release -o ./nuget --no-build
- name: Publish NuGet Packages
run: dotnet nuget push ./nuget/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate -s https://api.nuget.org/v3/index.json
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: nuget/*