Skip to content

Commit 5564d11

Browse files
committed
Update dependabot configuration to use 'uv' package ecosystem and change update interval to weekly
1 parent c02c18d commit 5564d11

2 files changed

Lines changed: 40 additions & 24 deletions

File tree

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
version: 2
22
updates:
3-
- package-ecosystem: pip
3+
- package-ecosystem: uv
44
directory: "/"
55
schedule:
6-
interval: "daily"
6+
interval: "weekly"
77
time: "08:00"
88
open-pull-requests-limit: 10
99

1010
- package-ecosystem: github-actions
1111
directory: "/"
1212
schedule:
13-
interval: "daily"
13+
interval: "weekly"
1414
time: "08:00"
1515
open-pull-requests-limit: 10

.github/workflows/release.yml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This workflow will upload a Python package when a release is published
1+
# This workflow will upload the package to PyPi when a release is published
22

33
name: Publish Python Package (PyPi)
44

@@ -12,32 +12,48 @@ jobs:
1212
environment: release
1313

1414
permissions:
15-
# IMPORTANT: this permission is mandatory for trusted publishing
15+
# IMPORTANT: this permission is mandatory for trusted publishing via PyPi
1616
id-token: write
17+
contents: write
1718

1819
steps:
1920
- uses: actions/checkout@v6
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v7
24+
2025
- name: Set up Python
2126
uses: actions/setup-python@v6
2227
with:
23-
python-version: '3.x'
24-
- name: Install uv
25-
uses: astral-sh/setup-uv@v7
26-
- name: Bump project version
28+
python-version: "3.x"
29+
30+
- name: Retrieve version from tag name
31+
id: retrieve-version
2732
run: |
28-
tag=${{ github.event.release.tag_name }}
29-
version_number=${tag#?}
30-
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version "$version_number"
31-
- name: Commit changes
32-
uses: EndBug/add-and-commit@v4
33-
with:
34-
message: "Bump version to ${{ github.event.release.tag_name }}"
35-
add: "pyproject.toml"
36-
ref: "main"
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
- name: Build package distribution
33+
tag="${{ github.event.release.tag_name }}"
34+
version_number="${tag#?}"
35+
echo "version: $version_number"
36+
echo "version=$version_number" >> "$GITHUB_OUTPUT"
37+
38+
- name: Bump project version in pyproject.toml and commit changes to current branch and tag
39+
run: |
40+
VERSION=${{ steps.retrieve-version.outputs.version }}
41+
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version $VERSION
42+
43+
git config --local user.email "action@github.com"
44+
git config --local user.name "GitHub Action"
45+
46+
git add pyproject.toml
47+
git commit -m "Bump package version to ${{ steps.retrieve-version.outputs.version }}."
48+
49+
git tag -f -a ${{ github.event.release.tag_name }} -m "Release ${{ steps.retrieve-version.outputs.version }}."
50+
git push origin HEAD:main
51+
git push origin -f ${{ github.event.release.tag_name }}
52+
53+
- name: Build package
54+
run: |
55+
uv build
56+
57+
- name: Publish package to PyPI
4058
run: |
41-
uv build
42-
- name: Publish package distributions to PyPI
43-
uses: pypa/gh-action-pypi-publish@release/v1
59+
uv publish

0 commit comments

Comments
 (0)