-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (34 loc) · 1.07 KB
/
publish-release-tag.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
name: Publish Release NuGets on tag
on:
push:
tags:
- '*'
env:
SOLUTION: Cli4Fody.sln
jobs:
publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: 8.0.x
- name: Remove Samples
run: dotnet sln ${{ env.SOLUTION }} remove $(find samples -name "*.csproj")
- name: Restore NuGets
run: dotnet restore ${{ env.SOLUTION }}
- name: Build Solution
run: dotnet build --configuration Release --no-restore ${{ env.SOLUTION }}
- name: Delete exists packages
run: rm -rf nugets
- name: Pack NuGets
run: dotnet pack ${{ env.SOLUTION }} --no-build --configuration Release
- name: Publish
run: dotnet nuget push nugets/**.nupkg -k ${{ secrets.API_KEY }} -s https://api.nuget.org/v3/index.json
- name: Create github release
uses: ncipollo/release-action@v1
with:
bodyFile: CHANGELOG.md