-
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 2.25 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
name: 🚀Release
run-name: 🚀${{ inputs.release-type }} Release ${{ inputs.dry-run == true && '(Dry Run)' || '' }}
defaults:
run:
shell: pwsh
on:
workflow_dispatch:
inputs:
release-type:
description: The type of release to validate. Either 'Preview' or 'Production'.
required: true
type: choice
options: [Preview, Production]
runs-on:
description: The type of runner to run the workflow on.
required: false
type: choice
options: [ubuntu-latest, windows-latest, macos-latest]
default: ubuntu-latest
dry-run:
description: Dry Run - Check to run the workflow without creating a release.
required: false
default: false
type: boolean
jobs:
determine_release_notes_path:
name: Determine Release Notes Dir Path
runs-on: ubuntu-latest
outputs:
release-notes-dir-path: ${{ steps.get-dir-path.outputs.release-notes-dir-path }}
steps:
- name: Get Dir Path
id: get-dir-path
run: |
$dirPath = "${{ inputs.release-type }}" -eq "Production" ? "${{ vars.PROD_RELATIVE_RELEASE_NOTES_DIR_PATH }}" : "${{ vars.PREV_RELATIVE_RELEASE_NOTES_DIR_PATH }}";
"release-notes-dir-path=$dirPath" >> $env:GITHUB_OUTPUT;
perform_release:
name: Performing ${{ inputs.release-type }} Release of ${{ vars.PROJECT_NAME }} (${{ inputs.release-type == 'Production' && 'Release' || 'Debug' }})
needs: determine_release_notes_path
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
project-name: "${{ vars.PROJECT_NAME }}"
release-type: "${{ inputs.release-type }}"
run-branch: "${{ github.ref_name }}"
net-sdk-version: "${{ vars.NET_SDK_VERSION }}"
relative-release-notes-dir-path: "${{ needs.determine_release_notes_path.outputs.release-notes-dir-path }}"
release-notes-file-name-prefix: "${{ vars.RELEASE_NOTES_FILE_NAME_PREFIX }}"
build-config: "${{ inputs.release-type == 'Production' && 'Release' || 'Debug' }}"
pr-include-notes-label: "${{ vars.PR_INCLUDE_NOTES_LABEL }}"
runs-on: ${{ inputs.runs-on }}
dry-run: ${{ inputs.dry-run }}
secrets:
cicd-pat: ${{ secrets.CICD_TOKEN }}