-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.95 KB
/
publish.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
49
50
51
52
53
54
55
56
name: publish
on:
workflow_dispatch:
inputs:
incremented-value:
description: 'The part of the version number to increment.'
required: true
default: 'patch'
prerelease:
description: 'The prerelease part of the version number.'
required: false
default: ''
metadata:
description: 'The metadata part of the version number.'
required: false
default: ''
env:
DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX: '2'
jobs:
publish:
name: publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Semver tags
id: semver
uses: SOLIDSoftworks/[email protected]
with:
# The github token.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
incremented-value: ${{ github.event.inputs.incremented-value }}
prerelease: ${{ github.event.inputs.prerelease }}
metadata: ${{ github.event.inputs.metadata }}
- name: setup_dotnet
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
8.0.x
- name: install_dependencies
run: dotnet restore ./src/Solid.Identity.Protocols.Saml2p.sln
- name: build
run: dotnet build ./src/Solid.Identity.Protocols.Saml2p.sln --configuration Release --no-restore -p:VersionPrefix=${{ steps.semver.outputs.core-version }}
- name: test
run: dotnet test ./src/Solid.Identity.Protocols.Saml2p.sln --configuration Release --no-restore --no-build
- name: package
run: dotnet pack ./src/Solid.Identity.Protocols.Saml2p.sln --configuration Release --no-build -p:Version=${{ steps.semver.outputs.semantic-version }} -o ./
- name: push
run: dotnet nuget push Solid.Identity.Protocols.Saml2p.${{ steps.semver.outputs.semantic-version }}.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}