feat: release 6.4.3 #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Announcements | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - master | |
| jobs: | |
| announce: | |
| name: Generate and send release announcements | |
| if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Extract version from branch name | |
| run: | | |
| BRANCH="${{ github.event.pull_request.head.ref }}" | |
| VERSION="${BRANCH#release/}" | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Checkout master | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Enable Corepack (Yarn Berry) | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Generate announcements | |
| env: | |
| CLAUDE_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | |
| run: yarn generate:announcements --version ${{ env.VERSION }} | |
| - name: Commit and push announcements to branch | |
| run: | | |
| git config user.name "webiny-bot" | |
| git config user.email "webiny-bot@webiny.com" | |
| git checkout -b release-announcements/${{ env.VERSION }} | |
| git add docs/release-notes/${{ env.VERSION }}/announcements/ | |
| git commit -m "chore: add announcements for ${{ env.VERSION }}" | |
| git push origin release-announcements/${{ env.VERSION }} | |
| - name: Create PR | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| PR_URL=$(gh pr create \ | |
| --title "chore: add announcements for ${{ env.VERSION }}" \ | |
| --body "Release announcements for ${{ env.VERSION }} — please review and merge to publish." \ | |
| --base master \ | |
| --head release-announcements/${{ env.VERSION }}) | |
| echo "PR_URL=$PR_URL" >> $GITHUB_ENV | |
| - name: Send Slack announcement | |
| env: | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_RELEASE_CHANNEL_WEBHOOK }} | |
| REPO_URL: ${{ github.server_url }}/${{ github.repository }} | |
| run: | | |
| VERSION="${{ env.VERSION }}" | |
| BASE="docs/release-notes/${VERSION}/announcements" | |
| ANNOUNCE_BRANCH="release-announcements/${VERSION}" | |
| SLACK_URL="${REPO_URL}/blob/${ANNOUNCE_BRANCH}/${BASE}/slack.md" | |
| SOCIAL_URL="${REPO_URL}/blob/${ANNOUNCE_BRANCH}/${BASE}/social.md" | |
| TWEETS_URL="${REPO_URL}/blob/${ANNOUNCE_BRANCH}/${BASE}/tweets.md" | |
| PR_URL="${{ env.PR_URL }}" | |
| jq -n \ | |
| --arg version "$VERSION" \ | |
| --arg pr_url "$PR_URL" \ | |
| --arg slack_url "$SLACK_URL" \ | |
| --arg social_url "$SOCIAL_URL" \ | |
| --arg tweets_url "$TWEETS_URL" \ | |
| '{ | |
| "text": ("Release " + $version + " announcements ready for review"), | |
| "blocks": [ | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": ("*Release " + $version + " announcements ready* — please review and merge :eyes:") | |
| } | |
| }, | |
| { | |
| "type": "section", | |
| "text": { | |
| "type": "mrkdwn", | |
| "text": ("• *PR* — <" + $pr_url + "|review / merge>\n• *Slack* — <" + $slack_url + "|view / edit>\n• *X / LinkedIn* — <" + $social_url + "|view / edit>\n• *Follow-up tweets* — <" + $tweets_url + "|view / edit>") | |
| } | |
| }, | |
| { | |
| "type": "context", | |
| "elements": [ | |
| { | |
| "type": "mrkdwn", | |
| "text": "To quickly edit all announcements with AI, open the repo in your IDE." | |
| } | |
| ] | |
| } | |
| ] | |
| }' | curl -s -X POST "$SLACK_WEBHOOK" \ | |
| -H "Content-Type: application/json" \ | |
| -d @- |