2020-12-16 18:50:02 +08:00
|
|
|
name: prepare release pr
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
branch:
|
|
|
|
description: 'Branch to base the release from'
|
|
|
|
required: true
|
|
|
|
default: ''
|
|
|
|
major:
|
|
|
|
description: 'Major release? (yes/no)'
|
|
|
|
required: true
|
|
|
|
default: 'no'
|
2021-06-25 02:05:56 +08:00
|
|
|
prerelease:
|
|
|
|
description: 'Prerelease (ex: rc1). Leave empty if not a pre-release.'
|
2021-08-28 01:26:30 +08:00
|
|
|
required: false
|
2021-06-25 02:05:56 +08:00
|
|
|
default: ''
|
2020-12-16 18:50:02 +08:00
|
|
|
|
2021-05-16 16:17:05 +08:00
|
|
|
# Set permissions at the job level.
|
|
|
|
permissions: {}
|
|
|
|
|
2020-12-16 18:50:02 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
2021-05-16 16:17:05 +08:00
|
|
|
permissions:
|
2021-05-16 16:37:21 +08:00
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
2020-12-16 18:50:02 +08:00
|
|
|
|
|
|
|
steps:
|
2023-09-11 17:50:08 +08:00
|
|
|
- uses: actions/checkout@v4
|
2020-12-16 18:50:02 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Set up Python
|
2023-12-11 16:46:13 +08:00
|
|
|
uses: actions/setup-python@v5
|
2020-12-16 18:50:02 +08:00
|
|
|
with:
|
|
|
|
python-version: "3.8"
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install --upgrade setuptools tox
|
|
|
|
|
|
|
|
- name: Prepare release PR (minor/patch release)
|
2020-12-16 18:53:05 +08:00
|
|
|
if: github.event.inputs.major == 'no'
|
2020-12-16 18:50:02 +08:00
|
|
|
run: |
|
2022-10-08 05:58:51 +08:00
|
|
|
tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }} --prerelease='${{ github.event.inputs.prerelease }}'
|
2020-12-16 18:50:02 +08:00
|
|
|
|
|
|
|
- name: Prepare release PR (major release)
|
2020-12-16 18:53:05 +08:00
|
|
|
if: github.event.inputs.major == 'yes'
|
2020-12-16 18:50:02 +08:00
|
|
|
run: |
|
2022-10-08 05:58:51 +08:00
|
|
|
tox -e prepare-release-pr -- ${{ github.event.inputs.branch }} ${{ github.token }} --major --prerelease='${{ github.event.inputs.prerelease }}'
|