From 9ae6941722f7d9d53976b078b08cefcbd82430f7 Mon Sep 17 00:00:00 2001 From: nabeliwo Date: Tue, 12 Mar 2024 17:59:18 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20github=20actions=20=E3=81=AE=20workflo?= =?UTF-8?q?w=20=E3=82=92=E6=9B=B4=E6=96=B0=20(#4426)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: github actions の workflow を更新 * chore: slack に送るメッセージを変更 --- .github/workflows/publishRelease.yml | 14 ++++++++++++-- .github/workflows/startRelease.yml | 12 +++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publishRelease.yml b/.github/workflows/publishRelease.yml index 582b9e13a8..f325f34944 100644 --- a/.github/workflows/publishRelease.yml +++ b/.github/workflows/publishRelease.yml @@ -17,7 +17,7 @@ jobs: with: ref: release-candidate fetch-depth: 0 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: 8 - uses: actions/setup-node@v4 @@ -62,8 +62,18 @@ jobs: run: | git checkout master git cherry-pick $NEW_TAG - - name: craete pull request + - name: create pull request uses: peter-evans/create-pull-request@v6 with: title: 'chore(release): ${{ env.NEW_TAG }}' branch: 'merge-release-${{ env.NEW_TAG }}' + labels: release candidate + - name: Send message to Slack + uses: slackapi/slack-github-action@v1.25.0 + with: + payload: | + { + "text": " npm publish が完了しました。Release Pull Request を手動でマージしたらリリース完了です。" + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/startRelease.yml b/.github/workflows/startRelease.yml index c1d036f75f..108ed4db94 100644 --- a/.github/workflows/startRelease.yml +++ b/.github/workflows/startRelease.yml @@ -9,6 +9,8 @@ on: manual_preparation: type: boolean description: '前リリースタグとの合流を手動で行う' + repository_dispatch: + types: [remote_dispatch] jobs: start_release: @@ -21,7 +23,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: pnpm/action-setup@v2 + - uses: pnpm/action-setup@v3 with: version: 8 - uses: actions/setup-node@v4 @@ -66,3 +68,11 @@ jobs: title: Release candidate content-filepath: ${{ env.RESULT_PATH }} labels: ${{ env.ISSUE_LABELS }} + - name: Send GitHub Action trigger data to Slack + if: ${{ github.event.client_payload.channel_id != null }} + uses: slackapi/slack-github-action@v1.25.0 + with: + channel-id: ${{ github.event.client_payload.channel_id }} + payload: ${{ github.event.client_payload.say }} + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}