-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathupdate-balatrobot-dependency.yml
More file actions
48 lines (47 loc) · 1.75 KB
/
Copy pathupdate-balatrobot-dependency.yml
File metadata and controls
48 lines (47 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Update balatrobot dependency
on:
repository_dispatch:
types: [balatrobot_release]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-dependency:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract version from payload
id: version
run: |
VERSION="${{ github.event.client_payload.version }}"
if [ -z "$VERSION" ]; then
VERSION=$(curl -s https://pypi.org/pypi/balatrobot/json | jq -r .info.version)
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Update balatrobot dependency
run: |
# Update exact version in pyproject.toml
sed -i 's/balatrobot>=.*/balatrobot>=${{ steps.version.outputs.VERSION }}",/' pyproject.toml
# Verify the change
grep balatrobot pyproject.toml
- name: Update lock file
run: uv sync
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "deps: update balatrobot to ${{ steps.version.outputs.VERSION }}"
title: "deps: bump balatrobot to ${{ steps.version.outputs.VERSION }}"
body: |
Automatic dependency update after balatrobot release `${{ steps.version.outputs.VERSION }}`
Updated:
- `pyproject.toml`: balatrobot pinned to `${{ steps.version.outputs.VERSION }}`
- `uv.lock`: regenerated with new dependencies
branch: "deps/balatrobot-${{ steps.version.outputs.VERSION }}"
delete-branch: true