-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (51 loc) · 1.56 KB
/
Copy pathrelease-please.yml
File metadata and controls
51 lines (51 loc) · 1.56 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
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
workflow_run:
workflows: ["Code Quality"]
types:
- completed
branches: [main]
permissions:
contents: write
pull-requests: write
name: Release tag
jobs:
release-please:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.PAT }}
release-type: python
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
with:
fetch-depth: 0
ref: main
- name: Install uv
if: ${{ steps.release.outputs.release_created }}
uses: astral-sh/setup-uv@v5
- name: Configure Git
if: ${{ steps.release.outputs.release_created }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Update lock file
if: ${{ steps.release.outputs.release_created }}
run: uv lock
- name: Commit and push updated lock file
if: ${{ steps.release.outputs.release_created }}
run: |
if [[ -n $(git status --porcelain uv.lock) ]]; then
git add uv.lock
git commit -m "chore(deps): update uv.lock for version ${{ steps.release.outputs.version }}"
git push
else
echo "No changes to uv.lock"
fi