Skip to content

Commit c4fda21

Browse files
committed
chore: Updates actions and switches to flake8 v7 for tests
1 parent bef737d commit c4fda21

File tree

2 files changed

+36
-10
lines changed

2 files changed

+36
-10
lines changed

.github/workflows/publish.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,41 @@ jobs:
88
build-and-publish-test:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: snok/.github/workflows/publish@main
11+
- uses: actions/checkout@v6
12+
- uses: actions/setup-python@v6
1213
with:
13-
overwrite-repository: true
14-
repository-url: https://test.pypi.org/legacy/
15-
token: ${{ secrets.TEST_PYPI_TOKEN }}
14+
python-version: "3.10"
15+
- name: Load cached Poetry installation
16+
uses: actions/cache@v5
17+
with:
18+
# This path assumes the workflow is run on an ubuntu runner
19+
path: ~/.local
20+
key: key-poetry-0
21+
- uses: snok/install-poetry@v1
22+
- name: Publish package
23+
shell: bash
24+
run: |
25+
poetry config repositories.custom 'https://test.pypi.org/legacy/'
26+
poetry config pypi-token.custom ${{ secrets.PYPI_TOKEN }}
27+
poetry publish --build --no-interaction --repository custom
1628
build-and-publish:
1729
needs: build-and-publish-test
1830
runs-on: ubuntu-latest
1931
steps:
20-
- uses: snok/.github/workflows/publish@main
32+
- uses: actions/checkout@v6
33+
- uses: actions/setup-python@v6
34+
with:
35+
python-version: "3.10"
36+
- name: Load cached Poetry installation
37+
uses: actions/cache@v5
2138
with:
22-
token: ${{ secrets.PYPI_TOKEN }}
39+
# This path assumes the workflow is run on an ubuntu runner
40+
path: ~/.local
41+
key: key-poetry-0
42+
- uses: snok/install-poetry@v1
43+
- name: Publish package
44+
shell: bash
45+
run: |
46+
echo "Using default repository (PyPi)"
47+
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
48+
poetry publish --build --no-interaction

.github/workflows/testing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ jobs:
4040
matrix:
4141
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
4242
steps:
43-
- uses: actions/checkout@v4
44-
- uses: actions/setup-python@v5
43+
- uses: actions/checkout@v6
44+
- uses: actions/setup-python@v6
4545
id: setup-python
4646
with:
4747
python-version: "${{ matrix.python-version }}"
48-
- uses: actions/cache@v4
48+
- uses: actions/cache@v5
4949
id: poetry-cache
5050
with:
5151
path: |
@@ -66,7 +66,7 @@ jobs:
6666
- run: source .venv/bin/activate && poetry install
6767
- name: Run tests
6868
run: |
69-
pip install flake8==5
69+
pip install flake8==7
7070
pip install -e .
7171
flake8 .
7272
source .venv/bin/activate

0 commit comments

Comments
 (0)