Skip to content

[failure] Prepare release: 1.4.3 #16

[failure] Prepare release: 1.4.3

[failure] Prepare release: 1.4.3 #16

name: Release stage 2 - auto publish
on:
pull_request: # types AND paths
types: [closed]
paths: ['cylc/sphinx_ext/__init__.py']
# NOTE: While this is too generic, we use the `if` condition of the job to narrow it down
# NOTE: Don't use `branches` as we might create release on any branch
env:
# Best not to include the GH token here, only do it for the steps that need it
MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }}
jobs:
publish:
if: >- # NOTE: Can't use top-level env here unfortunately
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'release')
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ env.MERGE_SHA }}
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
sudo apt-get install -y graphviz
pip install git+https://github.com/cylc/cylc-flow/ # install latest cylc-flow
pip install -e .[all]
- name: Get the version number
uses: cylc/release-actions/stage-2/get-version-from-pr@v1
- name: Build
uses: cylc/release-actions/build-python-package@v1
- name: Publish distribution to PyPI
uses: pypa/[email protected]
with:
user: __token__ # uses the API token feature of PyPI - least permissions possible
password: ${{ secrets.PYPI_TOKEN }}
- name: Publish GitHub release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: ${{ env.MERGE_SHA }}
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
prerelease: ${{ env.PRERELEASE }}
- name: Make HTML
run: make html
- name: Deploy GitHub Pages
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./_build/html
publish_branch: gh-pages
- name: Comment on the release PR with the results & next steps
if: always()
uses: cylc/release-actions/stage-2/comment-on-pr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release-url: ${{ steps.create-release.outputs.html_url }}