Skip to content

Commit bea83fe

Browse files
authored
Merge pull request RustPython#5466 from theshubhamp/gh-release
2 parents c8fd3bd + 3feaf68 commit bea83fe

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

.github/workflows/release.yml

+23-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
on:
2-
push:
3-
branches: [main]
4-
51
name: Release
62

3+
on:
4+
schedule:
5+
# 9 AM UTC on every Monday
6+
- cron: "0 9 * * Mon"
7+
workflow_dispatch:
8+
inputs:
9+
pre-release:
10+
type: boolean
11+
description: Mark "Pre-Release"
12+
required: false
13+
default: true
14+
715
permissions:
816
contents: write
917

@@ -119,9 +127,19 @@ jobs:
119127
tag: ${{ github.ref_name }}
120128
run: ${{ github.run_number }}
121129
run: |
130+
if [[ "${{ github.event.inputs.pre-release }}" == "true" ]]; then
131+
RELEASE_TYPE_NAME=Pre-Release
132+
PRERELEASE_ARG=--prerelease
133+
else
134+
RELEASE_TYPE_NAME=Release
135+
PRERELEASE_ARG=
136+
fi
137+
122138
today=$(date '+%Y-%m-%d')
123139
gh release create "$today-$tag-$run" \
124140
--repo="$GITHUB_REPOSITORY" \
125-
--title="RustPython Release $today-$tag #$run" \
141+
--title="RustPython $RELEASE_TYPE_NAME $today-$tag #$run" \
126142
--target="$tag" \
143+
--generate-notes \
144+
$PRERELEASE_ARG \
127145
bin/rustpython-release-*

0 commit comments

Comments
 (0)