chore(deps): lock file maintenance #64
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: Release | |
on: | |
push: | |
branches: | |
- "main" | |
- "feature/*" | |
- "hotfix/*" | |
- "release/*" | |
tags: | |
- "*" | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "latest" | |
- name: Build packages | |
run: | | |
uv build | |
- name: Check packages | |
run: | | |
uv tool run twine check dist/* | |
- name: Store the distribution packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
publish-pypi: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: startsWith(github.ref, 'refs/tags/') | |
environment: | |
name: pypi | |
url: https://pypi.org/p/pytest-time | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
publish-gh: | |
runs-on: ubuntu-latest | |
needs: [publish-pypi] | |
if: startsWith(github.ref, 'refs/tags/') | |
environment: | |
name: GitHub Release | |
permissions: | |
contents: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
name: python-package-distributions | |
path: dist/ | |
- name: Release on GitHub | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
dist/* |