Skip to content

Commit

Permalink
ci: add release-please config
Browse files Browse the repository at this point in the history
  • Loading branch information
Mogyuchi committed Dec 11, 2023
1 parent 2ff2a0d commit 68392fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/.config/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"pull-request-title-pattern": "release: ${version}",
"release-type": "rust"
}
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
- uses: google-github-actions/release-please-action@a2d8d683f209466ee8c695cd994ae2cf08b1642d # v4.0.1
id: release
with:
release-type: rust
config-file: .github/.config/release-please-config.json

build:
docker-publish:
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
permissions:
Expand All @@ -33,7 +33,7 @@ jobs:
tag-name: ${{ needs.release-please.outputs.tag_name }}

post-release:
needs: [build]
needs: [docker-publish]
permissions:
pull-requests: write
env:
Expand All @@ -50,7 +50,7 @@ jobs:
echo "pr_number=$(printf '${{ github.event.head_commit.message }}' | head -n1 | sed -nE 's/.+\(#([0-9]+)\)$/\1/p')" >> "$GITHUB_OUTPUT"
- name: Add comment to PR
run: |
printf ':robot: Successfully published to ${{ needs.build.outputs.image_url }} :truck:\n```\n${{ join(needs.build.outputs.image_tags, '\n') }}\n```' \
printf ':robot: Successfully published to ${{ needs.docker-publish.outputs.image_url }} :truck:\n```\n${{ join(needs.build.outputs.image_tags, '\n') }}\n```' \
| gh pr comment ${{ steps.pr-number.outputs.pr_number }} --body-file=-
- name: Change labels on PR
run: |
Expand Down

0 comments on commit 68392fb

Please sign in to comment.