Skip to content

Commit

Permalink
Python version handling in workflows to use version file
Browse files Browse the repository at this point in the history
  • Loading branch information
staciax committed Dec 29, 2024
1 parent e08234a commit 094db60
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
python-version-file: ".python-version"

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.x"
enable-cache: true

- run: uv run make lint

39 changes: 22 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,30 @@ on:
permissions:
contents: read

# TDDO: migrate to uv for building

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 094db60

Please sign in to comment.