Skip to content

Commit f87ffa3

Browse files
Copilotvinzenzmay
andauthored
chore: Automate pixi.lock updates in release-please workflow (#56)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vinzenzmay <44975247+vinzenzmay@users.noreply.github.com>
1 parent af59a2c commit f87ffa3

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/release-please.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
outputs:
1717
release_created: ${{ steps.release.outputs.release_created }}
1818
tag_name: ${{ steps.release.outputs.tag_name }}
19+
pr: ${{ steps.release.outputs.pr }}
20+
pr_head_ref: ${{ steps.release.outputs.pr_head_ref }}
1921
steps:
2022
- name: Create GitHub release
2123
uses: GoogleCloudPlatform/release-please-action@v4
@@ -24,6 +26,33 @@ jobs:
2426
# Use the built-in GITHUB_TOKEN if permissions allow,
2527
# otherwise ensure BOT_TOKEN has 'workflows' scope.
2628
token: ${{ secrets.BOT_TOKEN }}
29+
30+
- name: Checkout release PR branch
31+
if: ${{ steps.release.outputs.pr }}
32+
uses: actions/checkout@v4
33+
with:
34+
ref: ${{ steps.release.outputs.pr_head_ref }}
35+
token: ${{ secrets.BOT_TOKEN }}
36+
37+
- name: Setup Pixi
38+
if: ${{ steps.release.outputs.pr }}
39+
uses: prefix-dev/setup-pixi@v0.8.1
40+
with:
41+
pixi-version: latest
42+
43+
- name: Update lockfile
44+
if: ${{ steps.release.outputs.pr }}
45+
run: |
46+
pixi update --no-install
47+
if git diff --quiet pixi.lock 2>/dev/null; then
48+
echo "No lockfile changes needed"
49+
else
50+
git config user.name "github-actions[bot]"
51+
git config user.email "github-actions[bot]@users.noreply.github.com"
52+
git add pixi.lock
53+
git commit -m "chore: update pixi.lock for version bump"
54+
git push
55+
fi
2756
2857
build-publish:
2958
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)