From c561d33cb213aaf2b8ede3907fcf2fccacc3b4c4 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 3 Jan 2025 21:26:18 +0530 Subject: [PATCH 1/3] Support both Release & Pre-Release in Release Workflow On Push "main" is removed --- .github/workflows/release.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0b0be12e2..b8ef1ca1f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,14 @@ -on: - push: - branches: [main] - name: Release +on: + workflow_dispatch: + inputs: + pre-release: + type: boolean + description: Mark "Pre-Release" + required: false + default: true + permissions: contents: write @@ -119,9 +124,18 @@ 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" \ + $PRERELEASE_ARG \ bin/rustpython-release-* \ No newline at end of file From bd627b58af3f9e549532120e9a03f2a532185b46 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 3 Jan 2025 21:29:33 +0530 Subject: [PATCH 2/3] Schedule Pre-Release on Monday 9AM UTC --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8ef1ca1f4..c0f2895c44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,9 @@ name: Release on: + schedule: + # 9 AM UTC on every Monday + - cron: "0 9 * * Mon" workflow_dispatch: inputs: pre-release: From 3feaf689d875dd0519547a649fa778552cdf5aeb Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 3 Jan 2025 21:38:31 +0530 Subject: [PATCH 3/3] Re-enable Release Notes Generation --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c0f2895c44..8933d2107d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -140,5 +140,6 @@ jobs: --repo="$GITHUB_REPOSITORY" \ --title="RustPython $RELEASE_TYPE_NAME $today-$tag #$run" \ --target="$tag" \ + --generate-notes \ $PRERELEASE_ARG \ bin/rustpython-release-* \ No newline at end of file