-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (68 loc) · 1.93 KB
/
continuous-integration.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI/CD
on:
workflow_dispatch:
push:
branches: [ develop, master ]
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint commits
uses: wagoid/commitlint-github-action@v6
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Get semantic release version
uses: cycjimmy/semantic-release-action@v4
id: semantic_dry
with:
semantic_version: 23
dry_run: true
extra_plugins: |
@semantic-release/exec@6.0.3
conventional-changelog-conventionalcommits@7.0.2
outputs:
new_release_published: ${{ steps.semantic_dry.outputs.new_release_published }}
new_release_version: ${{ steps.semantic_dry.outputs.new_release_version }}
test:
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Run unit tests
run: ./build.sh --target test --no-logo
release:
needs: [version, test]
if: needs.version.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Semantic release
uses: cycjimmy/semantic-release-action@v4
id: semantic
with:
semantic_version: 23
extra_plugins: |
@semantic-release/exec@6.0.3
conventional-changelog-conventionalcommits@7.0.2