actions: ubuntu-20.04 (deprecated) -> ubuntu-latest #500
This file contains hidden or 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: Build release version | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- '*.*.*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: pip install -e ".[ci]" | |
- name: Build release artifacts | |
run: python -m build | |
- name: Verify tag name | |
uses: nowsprinting/check-version-format-action@v3 | |
id: tag | |
- name: Publish tag to pypi | |
if: > | |
startsWith(github.ref, 'refs/tags/') && | |
steps.tag.outputs.is_valid == 'true' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |