rendercv/.github/workflows/publish.yaml

41 lines
887 B
YAML
Raw Normal View History

2024-02-18 20:40:03 +00:00
name: Publish to PyPI
# GitHub events that triggers the workflow:
on:
release:
2024-02-25 14:29:25 +00:00
types: [released, edited]
2024-02-18 20:40:03 +00:00
jobs:
2024-02-25 14:29:25 +00:00
call_tests_workflow:
name: Tests
uses: ./.github/workflows/tests.yaml
2024-02-18 20:40:03 +00:00
publish:
name: Publish to PyPI
2024-02-25 14:35:55 +00:00
needs: [call_tests_workflow]
2024-02-18 20:40:03 +00:00
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
2024-02-19 17:54:40 +00:00
- name: Check if the release tag matches the version
uses: samuelcolvin/check-python-version@v4.1
with:
version_file_path: rendercv/__init__.py
2024-02-18 20:40:03 +00:00
- name: Build
run: |
pip install -U build
python -m build
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1