Reusable GitHub workflows and Actions
usage of release.yml:
Create consuming workflow, e.g. .github/workflows/project-release.yml:
name: Shared-Release-Workflow
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+a[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+b[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
permissions:
id-token: write
contents: write
jobs:
call-release-workflow:
uses: TheNewThinkTank/gh-actions/.github/workflows/release.yaml@v1.0.4
with:
PACKAGE_NAME: "package-name"
OWNER: "github-org-or-username"setup-python-poetry:
- name: Setup Python and Poetry
uses: TheNewThinkTank/gh-actions/.github/actions/setup-python-poetry@v1.0.4
with:
python-version: ${{ env.PYTHONVERSION }}setup-python-uv:
- name: Setup Python and uv
uses: TheNewThinkTank/gh-actions/.github/actions/setup-python-uv@v1.0.4
with:
python-version: '3.11'
dependency-file: pyproject.toml # or requirements.txtcompare-pypi-versions:
- name: Compare Versions
uses: TheNewThinkTank/gh-actions/.github/actions/compare-pypi-versions@v1.0.4
with:
package_name: my-package
new_version: 1.2.3