| 1 |
name: Release stage 1 - create release PR (Cylc 8+ only) |
| 2 |
|
| 3 |
on: |
| 4 |
workflow_dispatch: |
| 5 |
inputs: |
| 6 |
version: |
| 7 |
description: Version number (PEP 440 compliant e.g., 8.12.4, 8.0a2 etc) |
| 8 |
required: true |
| 9 |
branch: |
| 10 |
description: The branch to open the PR against |
| 11 |
required: false |
| 12 |
default: 'master' |
| 13 |
|
| 14 |
concurrency: |
| 15 |
# Only let this run 1 at a time |
| 16 |
group: ${{ github.workflow }} |
| 17 |
cancel-in-progress: false |
| 18 |
|
| 19 |
defaults: |
| 20 |
run: |
| 21 |
shell: bash |
| 22 |
|
| 23 |
env: |
| 24 |
FORCE_COLOR: 2 |
| 25 |
PIP_PROGRESS_BAR: off |
| 26 |
|
| 27 |
jobs: |
| 28 |
create-release-pr: |
| 29 |
runs-on: ubuntu-latest |
| 30 |
timeout-minutes: 10 |
| 31 |
steps: |
| 32 |
|
| 33 |
- name: Sanitise workflow inputs # Should be 1st step |
| 34 |
uses: cylc/release-actions/stage-1/sanitize-inputs@v1 |
| 35 |
|
| 36 |
- name: Checkout repo |
| 37 |
uses: actions/checkout@v5 |
| 38 |
with: |
| 39 |
ref: ${{ env.BASE_REF }} |
| 40 |
fetch-depth: 0 # need to fetch all commits to check contributors |
| 41 |
|
| 42 |
- name: Check CONTRIBUTING.md |
| 43 |
uses: cylc/release-actions/check-shortlog@v1 |
| 44 |
|
| 45 |
- name: Setup Python |
| 46 |
uses: actions/setup-python@v6 |
| 47 |
with: |
| 48 |
python-version: '3.x' |
| 49 |
|
| 50 |
- name: Create & checkout PR branch |
| 51 |
uses: cylc/release-actions/stage-1/checkout-pr-branch@v1 |
| 52 |
|
| 53 |
- name: Set the package version |
| 54 |
uses: cylc/release-actions/stage-1/set-python-package-version@v1 |
| 55 |
with: |
| 56 |
init-file: 'cylc/flow/__init__.py' |
| 57 |
pypi-package-name: 'cylc-flow' |
| 58 |
|
| 59 |
- name: Test build |
| 60 |
uses: cylc/release-actions/build-python-package@v1 |
| 61 |
|
| 62 |
- name: Generate changelog |
| 63 |
run: | |
| 64 |
python3 -m pip install -q towncrier |
| 65 |
towncrier build --yes |
| 66 |
|
| 67 |
- name: Create pull request |
| 68 |
uses: cylc/release-actions/stage-1/create-release-pr@v1 |
| 69 |
with: |
| 70 |
test-workflows: test_fast.yml, test_functional.yml, bash.yml, test_conda-build.yml |
| 71 |
env: |
| 72 |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |