From 68392fb4ee760321808d54081e3d832332a0a31a Mon Sep 17 00:00:00 2001 From: Mogyuchi Date: Mon, 11 Dec 2023 13:06:17 +0900 Subject: [PATCH] ci: add release-please config --- .github/.config/release-please-config.json | 5 +++++ .github/workflows/release.yml | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .github/.config/release-please-config.json diff --git a/.github/.config/release-please-config.json b/.github/.config/release-please-config.json new file mode 100644 index 000000000..919347929 --- /dev/null +++ b/.github/.config/release-please-config.json @@ -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" +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc8ebf576..ce3363ad5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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: @@ -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: |