Skip to content

⬆️ Bump fonttools from 4.35.0 to 4.43.0 (#133) #115

⬆️ Bump fonttools from 4.35.0 to 4.43.0 (#133)

⬆️ Bump fonttools from 4.35.0 to 4.43.0 (#133) #115

# Publish archives to PyPI and TestPyPI using GitHub Actions
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Publish to PyPI
# Only run for pushes to the main branch and releases.
on:
push:
branches:
- main
release:
types:
- published
# Runs for pull requests should be disabled other than for testing purposes
#pull_request:
# branches:
# - main
permissions:
contents: read
jobs:
publish-pypi:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-22.04
permissions:
# This permission is mandatory for OIDC publishing
id-token: write
if: github.repository == 'weiji14/zen3geo'
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
# fetch all history so that poetry-dynamic-versioning works
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # v4.6.1
with:
python-version: '3.11'
- name: Install Poetry and dynamic-versioning plugin
run: |
pip install poetry==1.6.1
poetry self add poetry-dynamic-versioning[plugin]
poetry show
- name: Fix up version string for TestPyPI and PyPI
run: |
# Change poetry-dynamic-versioning to use metadata=false so that the
# local part of the version isn't included, making the version string
# compatible with PyPI.
sed --in-place "s/metadata = true/metadata = false/g" pyproject.toml
- name: Build a binary wheel and a source tarball
run: |
poetry build -vvv
echo ""
echo "Generated files:"
ls -lh dist/
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598 # v1.8.6
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598 # v1.8.6