-
-
Notifications
You must be signed in to change notification settings - Fork 15
50 lines (45 loc) · 1.75 KB
/
Copy pathrelease-trigger.yml
File metadata and controls
50 lines (45 loc) · 1.75 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
# Caller stub: release trigger (stage 2). Worked example for podnotes.
# Copy to .github/workflows/release-trigger.yml and edit the per-repo values.
#
# pull_request_target cannot live in the reusable workflow, so it lives here.
# The instant a release PR merges, this forwards the PR number to the reusable
# validate workflow, which performs the full merged-PR forensics and dispatches
# the release. The workflow never checks out PR head code, so pull_request_target
# is safe here.
name: Trigger release
on:
pull_request_target:
types: [closed]
# Recovery path: re-run forensic validation for an already-merged release PR
# (e.g. after a toolkit pin bump fixes a validation bug). The reusable
# workflow re-derives everything from the PR number and fails closed, so a
# bad number cannot dispatch a release.
workflow_dispatch:
inputs:
pr-number:
description: "Merged release PR number to re-validate"
required: true
type: string
permissions: {}
concurrency:
group: release-trigger
cancel-in-progress: false
jobs:
validate:
if: >-
github.event_name == 'workflow_dispatch' ||
(github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'master' &&
startsWith(github.event.pull_request.head.ref, 'release/'))
permissions:
actions: write
contents: write
pull-requests: read
uses: chhoumann/obsidian-plugin-workflows/.github/workflows/release-validate.yml@ebcf84b80dc48ba15e0eec1f3575d41519a78ed5 # v4
with:
pr-number: ${{ github.event.pull_request.number || inputs.pr-number }}
plugin-name: podnotes
package-manager: npm
default-branch: master
release-bot-app-slug: podnotes-release-bot
release-workflow: release.yml