Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: automate release notification #4769

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 67 additions & 2 deletions .github/workflows/RELEASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
tag: ${{ steps.tag.outputs.TAG }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get tag
id: tag
run: |
echo "TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=$(git describe --tags --abbrev=0)
gh release create $TAG --draft --title $TAG
gh release create ${{ steps.tag.outputs.TAG }} --draft --title ${{ steps.tag.outputs.TAG }}

build_release:
name: Build release
Expand Down Expand Up @@ -125,3 +130,63 @@ jobs:
EMAIL_TO: "${{ secrets.EMAIL_TO }}"
EMAIL_USERNAME: "${{ secrets.EMAIL_USERNAME }}"
run: npm run send-license-book-summary

communicate_release:
name: Communicate release
needs:
- pre_release
- build_release
runs-on: ubuntu-latest

# skip for release candidates
if: contains(needs.pre_release.outputs.tag, 'rc') == false
steps:
- name: Import Secrets
id: secrets
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/desktop-modeler/ci/slack_integration SUPPORT_SLACK_CHANNEL_ID;
secret/data/products/desktop-modeler/ci/slack_integration SLACK_BOT_TOKEN;
- name: Get changelog link
id: changelog
run: |
VERSION="$(echo ${{ needs.pre_release.outputs.tag }} | sed 's/v//' | tr -d '.')"
echo "LINK=https://github.com/camunda/camunda-modeler/blob/develop/CHANGELOG.md#$VERSION" >> $GITHUB_OUTPUT
- name: Get milestone link
id: milestone
env:
GH_TOKEN: ${{ github.token }}
run: |
# Fetch the list of milestones for the repository
# Filter for milestones that start with 'M' and are open
MILESTONE=$(gh api -H "Accept: application/vnd.github.v3+json" \
/repos/${{ github.repository }}/milestones \
--jq '[.[] | select(.title | startswith("M")) | .number ][0]'
)
echo "LINK=https://github.com/camunda/camunda-modeler/issues?q=is%3Aissue+label%3Achannel%3Asupport+milestone%3A$MILESTONE" >> $GITHUB_OUTPUT
- name: Post to a Slack channel
uses: slackapi/slack-github-action@v2
with:
method: chat.postMessage
token: ${{ steps.secrets.outputs.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ steps.secrets.outputs.SUPPORT_SLACK_CHANNEL_ID }}
blocks:
- type: section
text:
type: plain_text
text: '[fyi] Hi, Desktop Modeler ${{ needs.pre_release.outputs.tag }} release is upcoming. Contact @desktop-modeler-release-manager in case of any questions.'
- type: section
text:
type: mrkdwn
text: '${{ steps.changelog.outputs.LINK }}|Changelog>'
- type: section
text:
type: mrkdwn
text: '<${{ steps.milestone.outputs.LINK }}|Closed issues related to support>'
Loading