add Renovate comments #242
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: Python | |
on: | |
push: | |
branches: [ develop ] | |
tags: [ '*' ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Nix flake Nixpkgs inputs | |
uses: DeterminateSystems/flake-checker-action@main | |
- uses: cachix/install-nix-action@v30 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: cachix/cachix-action@v14 | |
with: | |
name: mycache | |
# If you chose signing key for write access | |
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | |
# If you chose API tokens for write access OR if you have a private cache | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
# TODO: How would I best pass the Python version to use for the test? | |
- run: nix flake check | |
# TODO: nix flake check won't show us test output if everything passes, but showing it is useful. | |
- run: nix run .#test | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
environment: release | |
permissions: | |
id-token: write | |
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Bump version | |
run: sed 's/version = "0.0.0"/version = "${{ github.ref_name }}"/' -i pyproject.toml && git diff | |
- name: Install uv | |
run: python -m pip install uv | |
- name: Build dist | |
run: uv build | |
- name: Publish | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: dist/ |