Skip to content

Commit 86a0a3b

Browse files
committed
Fixed GitHub workflows
1 parent 2b7c905 commit 86a0a3b

File tree

6 files changed

+21
-30
lines changed

6 files changed

+21
-30
lines changed

.github/actions/release/action.yaml

-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
name: Release
22
description: Create a GitHub release and upload the package to PyPI
33
inputs:
4-
pypi-api-token:
5-
description: 'PyPI API token'
6-
required: true
74
tag-name:
85
description: 'The name of the tag for the GitHub release'
96
required: true
10-
github-token:
11-
description: 'GitHub token'
12-
required: true
137

148
runs:
159
using: "composite"
@@ -31,9 +25,6 @@ runs:
3125
files: dist/*
3226
tag_name: "${{ inputs.tag-name }}"
3327
body_path: release-notes.md
34-
token: ${{ inputs.github-token }}
3528

3629
- name: Upload package to PyPI
3730
uses: pypa/gh-action-pypi-publish@release/v1
38-
with:
39-
password: ${{ inputs.pypi-api-token }}

.github/actions/setup-python-and-git/action.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ inputs:
44
python-version:
55
description: 'Python version to use'
66
required: false
7-
default: '3.11'
7+
default: '3.12'
88
runs:
99
using: 'composite'
1010
steps:
11-
- uses: actions/setup-python@v4
11+
- uses: actions/setup-python@v5
1212
name: Setup Python
1313
with:
1414
python-version: ${{ inputs.python-version }}
15-
cache: 'pip' # caching pip dependencies
16-
15+
- name: Install the latest version of uv
16+
uses: astral-sh/setup-uv@v4
17+
with:
18+
version: "latest"
1719
- name: Git check
1820
run: |
19-
git config --global user.email "bump-my-version@github.actions"
21+
git config --global user.email "action@github.actions"
2022
git config --global user.name "Testing Git"
2123
git --version
2224
git config --list

.github/workflows/docs-final.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,17 @@ jobs:
1919
uses: actions/checkout@v4
2020
with:
2121
fetch-depth: 0
22-
token: ${{ secrets.PAT }}
2322

24-
- name: Set up Python 3.10
25-
uses: actions/setup-python@v5
23+
- name: Setup Python and Git
24+
uses: ./.github/actions/setup-python-and-git
2625
with:
27-
python-version: "3.10"
26+
python-version: '3.12'
2827

2928
- name: Install dependencies
3029
run: |
3130
git pull --all
32-
python -m pip install ".[docs]"
31+
uv sync -p 3.12 --group docs
3332
3433
- name: Build and deploy documentation
3534
run: |
36-
mkdocs gh-deploy --strict -v
35+
uv run mkdocs gh-deploy --strict

.github/workflows/docs-preview.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626

27-
- name: Set up Python 3.10
28-
uses: actions/setup-python@v5
27+
- name: Setup Python and Git
28+
uses: ./.github/actions/setup-python-and-git
2929
with:
30-
python-version: "3.10"
30+
python-version: '3.12'
3131

3232
- name: Install dependencies
33-
run: |
34-
python -m pip install ".[docs]"
33+
run: uv sync -p 3.12 --group docs
3534

3635
- name: Build documentation
3736
run: |
38-
mkdocs build --strict -v
37+
uv run mkdocs build --strict
3938
4039
- name: Deploy preview
4140
uses: rossjrw/pr-preview-action@v1

.github/workflows/release.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,3 @@ jobs:
9696
uses: ./.github/actions/release
9797
with:
9898
tag-name: ${{ env.TAG_NAME }}
99-
github-token: ${{ secrets.PAT }}
100-
pypi-api-token: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/test.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ jobs:
4242
run: |
4343
echo -e '[ui]\nusername = Testing Mercurial<[email protected]>' > ~/.hgrc
4444
hg --version
45-
- name: Install test dependencies
46-
run: pip install '.[test]'
45+
- name: Install requirements
46+
shell: bash
47+
run: |
48+
uv sync -p 3.12 --group dev
4749
- name: Test
4850
run: pytest --cov-report=xml
4951
- name: Upload coverage to Codecov

0 commit comments

Comments
 (0)