Skip to content

chore(release): prepare for 0.12.3 #29

chore(release): prepare for 0.12.3

chore(release): prepare for 0.12.3 #29

Workflow file for this run

name: publish
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
release_to_pypi:
type: boolean
default: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pdftotext
uses: daaku/gh-action-apt-install@v4
with:
packages: build-essential libpoppler-cpp-dev pkg-config ocrmypdf
- name: Setup Python & Poetry
uses: ./.github/actions/setup-python-poetry
with:
python-version: "3.11"
poetry-version: "1.8.3"
- name: Build source and wheels
run: poetry build
- name: Release to PyPI
if: inputs.release_to_pypi || github.event_name == 'push'
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.MONOPOLY_PYPI_TOKEN }}
run: poetry publish
- name: Get monopoly version
id: monopoly_version
run: echo "monopoly_version=$(poetry version --short)" >> $GITHUB_OUTPUT
- name: Create release changelog
run: poetry run git cliff --latest > RELEASE_CHANGELOG.md
- name: Create a Github Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.monopoly_version.outputs.monopoly_version }}
target_commitish: main
body_path: RELEASE_CHANGELOG.md
files: |
LICENSE.md
dist/*monopoly*.whl
dist/*monopoly*.tar.gz