chore(deps): update dependency poethepoet to ^0.25.0 (#84) #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+**' | |
jobs: | |
build-n-publish: | |
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: "🛒 Checkout repository" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "🐍 Install Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- uses: actions/cache@v3 | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- name: "📜 Install Poetry" | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: 1.3.2 | |
- name: "🔍 Install dependencies" | |
run: poetry install --with dev | |
- name: 📷 Replace image URLs | |
run: sed -i '/\.png/s_](_](https://raw.githubusercontent.com/LukeSavefrogs/wsadmin-type-hints/main/_' README.md | |
# Source: https://stackoverflow.com/a/67569812/8965861 | |
# TODO: Replace ONLY local URLs | |
# - name: 📷 Replace image URLs | |
# run: | | |
# sed -r -i ' | |
# /\]\(.*?\.png/ { | |
# s_\]\(_\]\(https://raw.githubusercontent.com/LukeSavefrogs/wsadmin-type-hints/main/_; | |
# }' README.md | |
# gawk ' | |
# /\]\(.*?\.png.*?\)/ { | |
# } | |
# ' README.md | |
- name: "📚 Deploy" | |
run: poetry build --no-interaction --no-cache | |
# - name: Publish distribution 📦 to Test PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository_url: https://test.pypi.org/legacy/ | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |