Skip to content

bump: version 1.4.5 → 1.4.6 #18

bump: version 1.4.5 → 1.4.6

bump: version 1.4.5 → 1.4.6 #18

Workflow file for this run

name: "Publish Releases: PyPi / GitHub"
on:
push:
tags:
- '*.*.*'
workflow_dispatch:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
# Checkout Repo
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Setup Python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
# Install Poetry
- name: Install Poetry
run: |
python -m pip install pipx
pipx ensurepath
pipx install poetry
# Cache Poetry
- name: Setup Poetry Cache
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
# Install dependencies
- name: Install Deps
run: poetry install --with dev
# Get Version Tag
- name: Set up version
id: latest_version
run: |
echo "VERSION_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# Generate Incremental Changelog
- name: Generate Incremental Changelog
run: |
poetry run cz changelog $VERSION_TAG --file-name="release_notes.md"
# Publish to PyPi
- name: Publish to PyPI
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
# Create Release
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md
tag_name: ${{ env.VERSION_TAG }}
token: ${{ env.GITHUB_TOKEN }}
# Clean up
- name: Clean up
run: rm release_notes.md