-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (86 loc) · 3.03 KB
/
release-start.yml
File metadata and controls
91 lines (86 loc) · 3.03 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
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
82
83
84
85
86
87
88
89
90
91
# Reusable release workflow — creates a draft release and outputs the tag.
# Pair with release-finish.yml to publish or delete the draft after running your own gate.
---
name: Release - Start
on:
workflow_call:
inputs:
runs-on:
description: |
JSON array of runner(s) to use.
See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job.
type: string
default: '["ubuntu-latest"]'
required: false
prerelease:
description: |
Whether to mark the release as a prerelease.
See ../../actions/release/create/README.md for more information.
type: boolean
default: false
required: false
outputs:
tag:
description: "The tag of the draft release."
value: ${{ jobs.release.outputs.tag }}
workflow_dispatch:
inputs:
#checkov:skip=CKV_GHA_7: required
runs-on:
description: |
JSON array of runner(s) to use.
See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job.
type: string
default: '["ubuntu-latest"]'
required: false
prerelease:
description: |
Whether to mark the release as a prerelease.
See ../../actions/release/create/README.md for more information.
type: boolean
default: false
required: false
working-directory:
description: |
Working directory for monorepo support.
If specified, the release configuration will be generated at runtime when missing.
type: string
default: ""
required: false
include-paths:
description: |
Additional paths to include in the generated release configuration (JSON array).
type: string
default: "[]"
required: false
permissions: {}
jobs:
release:
name: Release
runs-on: ${{ fromJson(inputs.runs-on) }}
permissions:
contents: write
pull-requests: read
id-token: write # Needed for getting local workflow actions
outputs:
tag: ${{ steps.create-release.outputs.tag }}
steps:
- id: local-workflow-actions
uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@f5847cb398fe65d53794e6aba98ebdfa0801f691 # 0.32.0
with:
actions-path: actions
- id: create-release
uses: ./self-workflow/actions/release/create
with:
prerelease: ${{ inputs.prerelease }}
working-directory: ${{ inputs.working-directory }}
include-paths: ${{ inputs.include-paths }}
publish: false
# jscpd:ignore-start
- uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@f5847cb398fe65d53794e6aba98ebdfa0801f691 # 0.32.0
if: always() && steps.local-workflow-actions.outputs.repository
with:
actions-path: actions
repository: ${{ steps.local-workflow-actions.outputs.repository }}
ref: ${{ steps.local-workflow-actions.outputs.ref }}
# jscpd:ignore-end