-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (43 loc) · 1.44 KB
/
release.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
45
46
47
48
name: Release
on:
workflow_dispatch:
push:
branches:
- master
env:
PROJECT_PATH: 'Pluggy.SDK/Pluggy.SDK.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output
NUGET_PUSH_URL: ${{ secrets.NUGET_PUSH_URL }}
NUGET_KEY: ${{ secrets.NUGET_KEY }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Semantic Release
id: release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19
working_directory: ./Pluggy.SDK
extra_plugins: |
@semantic-release/commit-analyzer@9
@semantic-release/release-notes-generator@10
@semantic-release/github@8
@semantic-release/git@10
@semantic-release/exec@6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUNNER_DEBUG: 1
- name: 'Pack & Publish project'
if: ${{ steps.release.outputs.new_release_version }}
run: |
dotnet clean
dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --include-symbols --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_KEY }} -s ${{ env.NUGET_PUSH_URL }} --skip-duplicate