Merge pull request #5466 from theshubhamp/gh-release

This commit is contained in:
Jeong, YunWon
2025-01-04 11:43:10 +09:00
committed by GitHub

View File

@@ -1,9 +1,17 @@
on:
push:
branches: [main]
name: Release
on:
schedule:
# 9 AM UTC on every Monday
- cron: "0 9 * * Mon"
workflow_dispatch:
inputs:
pre-release:
type: boolean
description: Mark "Pre-Release"
required: false
default: true
permissions:
contents: write
@@ -119,9 +127,19 @@ jobs:
tag: ${{ github.ref_name }}
run: ${{ github.run_number }}
run: |
if [[ "${{ github.event.inputs.pre-release }}" == "true" ]]; then
RELEASE_TYPE_NAME=Pre-Release
PRERELEASE_ARG=--prerelease
else
RELEASE_TYPE_NAME=Release
PRERELEASE_ARG=
fi
today=$(date '+%Y-%m-%d')
gh release create "$today-$tag-$run" \
--repo="$GITHUB_REPOSITORY" \
--title="RustPython Release $today-$tag #$run" \
--title="RustPython $RELEASE_TYPE_NAME $today-$tag #$run" \
--target="$tag" \
--generate-notes \
$PRERELEASE_ARG \
bin/rustpython-release-*