41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Release Please
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: googleapis/release-please-action@v5.0.0
|
|
id: release
|
|
with:
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
config-file: release-please-config.json
|
|
manifest-file: .release-please-manifest.json
|
|
|
|
- uses: actions/checkout@v7.0.0
|
|
if: steps.release.outputs.pr
|
|
with:
|
|
ref: ${{ fromJson(steps.release.outputs.pr).headBranchName }}
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
|
|
- name: Update Cargo.lock
|
|
if: steps.release.outputs.pr
|
|
run: cargo update --workspace
|
|
|
|
- name: Commit updated Cargo.lock
|
|
if: steps.release.outputs.pr
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add Cargo.lock
|
|
git diff --cached --quiet || git commit -m "chore: update Cargo.lock"
|
|
git push
|