-
Notifications
You must be signed in to change notification settings - Fork 50
44 lines (35 loc) · 1.2 KB
/
publish-package.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
name: Master - Publish packages
on:
push:
branches: [ master ]
env:
CURRENT_REPO_URL: https://github.com/${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 18.0.1
extra_plugins: |
@semantic-release/changelog
@semantic-release/github
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Package
run: dotnet pack -c Release -o out -p:PackageVersion=${{ steps.semantic.outputs.new_release_version }} -p:RepositoryUrl=${{env.CURRENT_REPO_URL}}
- name: Publish the package to nuget.org
run: dotnet nuget push ./out/*.nupkg --skip-duplicate -n -d -k ${{ secrets.NUGET_AUTH_TOKEN}} -s https://api.nuget.org/v3/index.json