Skip to content

Widen supported django and python ranges, update developer tools #41

Widen supported django and python ranges, update developer tools

Widen supported django and python ranges, update developer tools #41

Workflow file for this run

name: cd
description: This workflow releases a new version of the package before publishing it to PyPI.
on:
pull_request:
types: [closed]
branches:
- main
jobs:
release:
if: '${{ github.event.pull_request.merged == true }}'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install poetry
uses: snok/install-poetry@v1.4.1
- name: Check pyproject.toml file
run: poetry check
- name: Get package version
id: get-package-version
run: echo "package_version=$(poetry version -s)" >> $GITHUB_OUTPUT
- 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.get-package-version.outputs.package_version }}
release_name: ${{ github.event.pull_request.title }}
body: ${{ github.event.pull_request.body }}
draft: false
prerelease: false
publish:
needs: release
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install poetry
uses: snok/install-poetry@v1.4.1
- name: Build a binary wheel and a source tarball
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@v1.10.3