Skip to content

Commit 072101e

Browse files
committed
update workflows, remove todo
1 parent c22e319 commit 072101e

3 files changed

Lines changed: 10 additions & 66 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/python-publish.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,20 @@ name: Publish Python Package to PyPI
66
on:
77
release:
88
types: [published]
9+
workflow_dispatch:
10+
inputs:
11+
use_test_pypi:
12+
description: 'Publish to Test PyPI instead of PyPI'
13+
required: false
14+
default: false
15+
type: boolean
916

1017
permissions:
1118
contents: read
1219
id-token: write # Required for trusted publishing
1320

1421
jobs:
15-
test:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
- name: Set up Python
20-
uses: actions/setup-python@v5
21-
with:
22-
python-version: '3.11'
23-
cache: 'pip'
24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install -e .[test,dev]
28-
- name: Lint with flake8
29-
run: |
30-
# stop the build if there are Python syntax errors or undefined names
31-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
32-
# exit-zero treats all errors as warnings.
33-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
34-
- name: Test with pytest
35-
run: |
36-
pytest
37-
3822
deploy:
39-
needs: test
4023
runs-on: ubuntu-latest
4124
environment:
4225
name: pypi
@@ -55,4 +38,6 @@ jobs:
5538
- name: Build package
5639
run: python -m build
5740
- name: Publish package distributions to PyPI
58-
uses: pypa/gh-action-pypi-publish@release/v1
41+
uses: pypa/gh-action-pypi-publish@v1.12.2
42+
with:
43+
repository-url: ${{ github.event.inputs.use_test_pypi == 'true' && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}

TODO

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)