Skip to content

Commit 78aa8e4

Browse files
authored
update the release proposal workflow to create the proposal (#5527)
1 parent 59a5f36 commit 78aa8e4

2 files changed

Lines changed: 34 additions & 8 deletions

File tree

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,33 @@
1-
name: Release Proposal PR check
1+
name: '[Release Proposal]'
22

33
on:
4-
pull_request:
5-
branches:
6-
- v[0-9]+.x
4+
workflow_dispatch:
5+
inputs:
6+
release-line:
7+
description: 'Release line'
8+
required: true
9+
default: all
10+
type: choice
11+
options:
12+
- 'all'
13+
- '5'
14+
increment:
15+
description: 'Version increment'
16+
required: true
17+
default: auto
18+
type: choice
19+
options:
20+
- 'auto'
21+
- 'minor'
22+
- 'patch'
723
jobs:
8-
check_labels:
24+
create-proposal:
925
runs-on: ubuntu-latest
26+
permissions:
27+
contents: read
28+
pull-requests: write
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1031
steps:
1132
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1233
with:
@@ -16,4 +37,5 @@ jobs:
1637
- run: |
1738
mkdir -p ~/.config/changelog-maker
1839
echo "{\"token\":\"${{secrets.GITHUB_TOKEN}}\",\"user\":\"${{github.actor}}\"}" > ~/.config/changelog-maker/config.json
19-
- run: node ./scripts/check-proposal-labels.js
40+
- run: node scripts/release/proposal 5 -y --{{ inputs.increment }}
41+
if: inputs.release-line == 'all' || inputs.release-line == '5'

scripts/release/proposal.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ if (!releaseLine || releaseLine === 'help' || flags.help) {
2626
log(
2727
'Usage: node scripts/release/proposal <release-line>\n',
2828
'Options:',
29+
' -y Always accept prompts.',
2930
' --debug Print raw commands and their outputs.',
3031
' --help Show this help.',
32+
' --auto Automatically detect version increment. (this is default)',
3133
' --minor Force a minor release.',
3234
' --patch Force a patch release.'
3335
)
@@ -138,8 +140,10 @@ try {
138140

139141
pass(notesFile)
140142

141-
// Stop and ask the user if they want to proceed with pushing everything upstream.
142-
checkpoint('Push the release upstream and create/update PR?')
143+
if (!flags.y) {
144+
// Stop and ask the user if they want to proceed with pushing everything upstream.
145+
checkpoint('Push the release upstream and create/update PR?')
146+
}
143147

144148
start('Push proposal upstream')
145149

0 commit comments

Comments
 (0)