Add missing space to log msg. #53
Workflow file for this run
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
name: Publish Python Package | |
# Publishes to | |
# - TestPyPI on new tags "v1.2.3" or "v1.2.3.something" on main branch | |
# - PyPI on releases created in GitHub UI | |
on: | |
push: | |
tags: | |
# GitHub glob matching is limited [1]. So we can't define a pattern matching | |
# pep 440 version definition [N!]N(.N)*[{a|b|rc}N][.postN][.devN] | |
- 'v[0-9]+.[0-9]+.[0-9]+.?*' | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build Python 🐍 distributions 📦 for publishing | |
# Don't try to publish from forks | |
if: github.repository == 'nfdi4cat/voc4cat-tool' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b | |
with: | |
python-version: 3.12 | |
- name: Install hatch | |
run: pipx install hatch | |
- name: Build source and wheel archives | |
run: hatch build | |
- name: Store built distribution | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b | |
with: | |
name: distribution-files | |
path: dist/ | |
pypi-publish: | |
name: Build and publish Python 🐍 package 📦 to PyPI and TestPyPI | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi-release | |
url: https://pypi.org/p/voc4cat | |
permissions: | |
id-token: write # this permission is mandatory for trusted publishing | |
steps: | |
- name: Download built distribution | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 | |
with: | |
name: distribution-files | |
path: dist | |
- name: Publish package 📦 to Test PyPI | |
if: github.event_name == 'push' | |
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
verbose: true | |
- name: Publish package 📦 to PyPI | |
if: github.event_name == 'release' | |
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc | |
with: | |
verbose: true | |
# [1] https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | |
# Used actions: (updates managed by dependabot) | |
# - https://github.com/actions/checkout | |
# - https://github.com/actions/setup-python | |
# - https://github.com/actions/upload-artifact | |
# - https://github.com/actions/download-artifact | |
# - https://github.com/pypa/gh-action-pypi-publish/ |