Skip to content

OPS: Widen python requirement to prevent prohibitive installs #18

OPS: Widen python requirement to prevent prohibitive installs

OPS: Widen python requirement to prevent prohibitive installs #18

Workflow file for this run

name: cd
on:
pull_request:
types: [closed]
branches:
- main
workflow_dispatch:
jobs:
publish:
# This job will only run if the PR has been merged (and not closed without merging).
if: "github.event.pull_request.merged == true && !contains(github.event.pull_request.head.message, 'skipci')"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
# No point testing this immediately before doing it. TODO refactor to CI.
# - name: Test package is publishable with PyPI test server
# uses: JRubics/[email protected]
# with:
# python_version: "3.9"
# pypi_token: ${{ secrets.TEST_PYPI_TOKEN }}
# repository_name: "testpypi"
# repository_url: "https://test.pypi.org/legacy/"
- name: Publish latest package to PyPI
uses: JRubics/[email protected]
with:
python_version: "3.9"
poetry_version: "==1.4.2" # (PIP version specifier syntax)
pypi_token: ${{ secrets.PYPI_TOKEN }}
ignore_dev_requirements: "yes"
release:
# This job will only run if the PR has been merged (and not closed without merging).
if: "github.event.pull_request.merged == true && !contains(github.event.pull_request.head.message, 'skipci')"
runs-on: ubuntu-latest
needs: [publish]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install poetry
run: pip install poetry
- name: Get package version
id: version
run: echo "::set-output name=package_version::$(poetry version -s)"
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, no need to create your own.
with:
tag_name: ${{ steps.version.outputs.package_version }}
release_name: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
draft: false
prerelease: false