Skip to content

Release tagged package #3

Release tagged package

Release tagged package #3

Workflow file for this run

name: Release tagged package
on: [workflow_dispatch]
jobs:
pylint:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
uses: ./.github/workflows/define-pylint.yml
with:
python-version: ${{ matrix.python-version }}
pytest:
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
uses: ./.github/workflows/define-pytest.yml
with:
python-version: ${{ matrix.python-version }}
build:
runs-on: self-hosted
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install build
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run all tests with pytest
run: |
python -m build
tag:
runs-on: self-hosted
outputs:
release-tag: ${{ steps.read-tag.outputs.release-tag }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install tomli
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Read tag from pyproject.toml
id: read-tag
shell: bash
run: |
TAG=$(python -c 'import tomli; print(tomli.load(open("pyproject.toml", "rb"))["project"]["version"])')
echo "release-tag=$(echo $TAG)" >> GITHUB_OUTPUT
- uses: mukunku/[email protected]
id: check-tag
with:
tag: ${{ steps.read-tag.outputs.release-tag }}
- run: echo "Tag exists!"
if: steps.check-tag.outputs.exists == 'true'
release:
needs: [pylint, pytest, build, tag]
runs-on: self-hosted
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: Add body.md
shell: bash
run: |
touch body.md