Release stage 1 - create release PR #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release stage 1 - create release PR | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Version number (PEP 440 compliant e.g., 1.12.4, 1.0a2 etc) | |
required: true | |
branch: | |
description: The branch to open the PR against | |
required: false | |
default: 'master' | |
check_shortlog: | |
description: Check contributors list against the mailmap | |
type: boolean | |
required: true | |
default: true | |
jobs: | |
create-release-pr: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Sanitise workflow inputs # Should be 1st step | |
uses: cylc/release-actions/stage-1/sanitize-inputs@v1 | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ env.BASE_REF }} | |
fetch-depth: 0 # need to fetch all commits to check contributors | |
- name: Check CONTRIBUTING.md | |
if: github.event.inputs.check_shortlog == 'true' | |
uses: cylc/release-actions/check-shortlog@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Create & checkout PR branch | |
uses: cylc/release-actions/stage-1/checkout-pr-branch@v1 | |
- name: Set the package version | |
uses: cylc/release-actions/stage-1/set-python-package-version@v1 | |
with: | |
init-file: 'cylc/rose/__init__.py' | |
pypi-package-name: 'cylc-rose' | |
- name: Update "released on" date in changelog | |
continue-on-error: true | |
uses: cylc/release-actions/stage-1/update-changelog-release-date@v1 | |
with: | |
changelog-file: 'CHANGES.md' | |
- name: Build test | |
uses: cylc/release-actions/build-python-package@v1 | |
- name: Create pull request | |
uses: cylc/release-actions/stage-1/create-release-pr@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
test-workflows: tests.yml |