-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (51 loc) · 1.41 KB
/
build-release-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
57
name: Build-Release-Publish
on:
push:
branches:
- main
- release/atcoder
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_NOLOGO: true
NUGET_XMLDOC_MODE: skip
WORKFLOW_BUILD_SLN: ac-library-csharp.sln
jobs:
get-version:
uses: kzrnm/dotnet-actions/.github/workflows/get-version.yml@v1
with:
project-path: Directory.Build.props
format:
uses: kzrnm/dotnet-actions/.github/workflows/format.yml@v1
with:
target: ac-library-csharp.sln
dotnet-version: |
3.0.x
3.1.x
7.0.x
test:
uses: kzrnm/dotnet-actions/.github/workflows/unittest.yml@v1
with:
target: ac-library-csharp.sln
test-logger: GitHubActions
dotnet-version: |
3.0.x
3.1.x
7.0.x
build-verify:
needs: get-version
uses: ./.github/workflows/reusable_verify.yml
with:
upload-artifact: ${{ fromJson(needs.get-version.outputs.is-new) }}
publish:
needs: [get-version, test, format, build-verify]
if: ${{ needs.get-version.outputs.is-new == 'true' }}
uses: kzrnm/dotnet-actions/.github/workflows/publish.yml@v1
with:
artifact-name: dist
version: ${{ needs.get-version.outputs.version }}
is-prerelease: ${{ fromJson(needs.get-version.outputs.is-prerelease) }}
secrets:
NUGET_KEY: ${{ secrets.NUGET_KEY }}