-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (61 loc) · 1.75 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
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
name: Release
on:
push:
branches:
- 'release/**'
- 'preview/**'
# paths:
# - 'src/**'
workflow_call:
permissions:
actions: read
env:
dotnet-sdk-version: '9.x'
jobs:
global-variables:
name: 'Global variables'
runs-on: ubuntu-latest
outputs:
github-run-id: ${{ github.run_id }}
github-run-number: ${{ github.run_number }}
steps:
- name: 'Global variables'
id: github
run: |
echo "github-run-id:${{ github.run_id }}"
echo "github-run-number:${{ github.run_number }}"
build:
name: Build
needs: [global-variables]
uses: ./.github/workflows/build.yml
secrets: inherit
with:
run-id: ${{ needs.global-variables.outputs.github-run-id }}
run-number: ${{ needs.global-variables.outputs.github-run-number }}
validate:
name: 'Validate'
needs: [build]
runs-on: ubuntu-latest
steps:
- name: 'Checkout ${{ github.head_ref || github.ref }}'
uses: actions/checkout@v4
- name: 'Setup .NET'
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet-sdk-version }}
- name: 'Validate warnings with .NET CLI'
shell: bash
run: |
dotnet format analyzers --severity warn --verify-no-changes
tee analyzers.txt
car analyzers.txt >> $GITHUB_STEP_SUMMARY
publish-package:
name: 'Publish'
uses: ./.github/workflows/publish-nuget-package.yml
needs: [global-variables, validate, build]
secrets: inherit
with:
artifact-run-id: ${{ needs.global-variables.outputs.github-run-id }}
artifact-name: ${{ needs.build.outputs.package-artifact-name }}
nuget-feed-server: 'NuGet'
environment: 'NuGet'