-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (46 loc) · 1.55 KB
/
cd.yml
File metadata and controls
51 lines (46 loc) · 1.55 KB
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
name: CD
on:
pull_request:
paths:
- 'CHANGELOG.md'
push:
branches: [main]
paths:
- 'CHANGELOG.md'
jobs:
publish-warning:
if: ${{ github.event_name == 'pull_request' && !startsWith(github.head_ref, 'release-') }}
runs-on: ubuntu-latest
name: Publish Warning
steps:
- run: |
echo 'This PR changes the CHANGELOG.md file and as such will trigger a release of production software! If this is not your intent, revert the changes to changelog.md. If your intent is to publish software, manually invoke the Prep Release workflow instead.' >> $GITHUB_STEP_SUMMARY
exit 1
tagversion:
if: ${{ github.event_name == 'push'}}
uses: ./.github/workflows/tagversion.yml
with:
prerelease: false
build:
needs: [tagversion]
if: ${{ github.event_name == 'push'}}
uses: ./.github/workflows/dotnetcore.yml
with:
new_tag: ${{ needs.tagversion.outputs.new_tag }}
new_version: ${{ needs.tagversion.outputs.new_version }}
release:
needs: [tagversion, build]
if: ${{ github.event_name == 'push'}}
uses: ./.github/workflows/release.yml
with:
new_tag: ${{ needs.tagversion.outputs.new_tag }}
changelog: ${{ needs.tagversion.outputs.changelog }}
prerelease: false
publish:
needs: [tagversion, release]
if: ${{ github.event_name == 'push'}}
uses: ./.github/workflows/publish.yml
with:
new_tag: ${{ needs.tagversion.outputs.new_tag }}
secrets:
nuget-token: ${{ secrets.NUGET_TOKEN }}