-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 1.78 KB
/
Copy pathrelease-please.yml
File metadata and controls
59 lines (51 loc) · 1.78 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
49
50
51
52
53
54
55
56
57
58
59
name: Release Please
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- id: release
# Pin to tagged release for supply-chain hardening.
# TODO: evaluate upgrade to v5.x (node24) once compatibility with release-please-config.json is verified (tracking: github.com/googleapis/release-please-action/issues/1162)
uses: googleapis/release-please-action@v4.4.1
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
update-uv-lock:
name: Update uv.lock file
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: main
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: pyproject.toml
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Update uv.lock file
run: uv lock
- name: Commit and push updated uv.lock
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "actions@github.com"
git add uv.lock
git commit -m "chore: update uv.lock after version bump [skip ci]" || echo "No changes to commit"
git remote set-url origin https://x-access-token:${{ secrets.RELEASE_PLEASE_TOKEN }}@github.com/${GITHUB_REPOSITORY}
git push