Release #7
This file contains 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
# | |
# Copyright (c) 2019-2023 Red Hat, Inc. | |
# This program and the accompanying materials are made | |
# available under the terms of the Eclipse Public License 2.0 | |
# which is available at https://www.eclipse.org/legal/epl-2.0/ | |
# | |
# SPDX-License-Identifier: EPL-2.0 | |
# | |
# Contributors: | |
# Red Hat, Inc. - initial API and implementation | |
# | |
name: Release | |
on: | |
# Trigger the workflow on tag creation only | |
push: | |
tags: | |
- '7.*.*' | |
release: | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The version that is going to be released. Should be in format 7.y.z' | |
required: true | |
jobs: | |
announce: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Create success message | |
run: | | |
milestone=${{ github.event.inputs.version }} | |
milestone=${milestone%.*}; echo "milestone: ${milestone}" | |
echo "{\"text\":\"Che ${{ github.event.inputs.version }} has been released.\n\n Please resolve or move unresolved issues assigned to this milestone: https://github.com/eclipse/che/milestones/${milestone}\"}" | |
echo "{\"text\":\"Che ${{ github.event.inputs.version }} has been released.\n\n Please resolve or move unresolved issues assigned to this milestone: https://github.com/eclipse/che/milestones/${milestone}\"}" > message.json | |
- name: Create failure message | |
if: ${{ failure() }} | |
run: | | |
echo "{\"text\":\"Che ${{ github.event.inputs.version }} release final checks have failed:\n\n failed: https://github.com/che-incubator/chectl/actions/workflows/release-announce.yml.\"}" | |
echo "{\"text\":\"Che ${{ github.event.inputs.version }} release final checks have failed:\n\n failed: https://github.com/che-incubator/chectl/actions/workflows/release-announce.yml.\"}" > message.json | |
# # SLACK_BOT_TOKEN only works if we have an app, webhook, or other slack integration - https://github.com/slackapi/slack-github-action#how-to-send-data-to-slack | |
# - name: Send message | |
# if: ${{ success() }} || ${{ failure() }} | |
# uses: slackapi/[email protected] | |
# with: | |
# channel-id: '@nboldt' | |
# #channel-id: 'forum-che-release' | |
# payload-file-path: "./message.json" | |
# env: | |
# SLACK_BOT_TOKEN: ${{ secrets.ECLIPSE_CHE_RELEASE_BOT_TOKEN}} | |
# - name: Ping Productization Team if Failure | |
# if: ${{ failure() }} | |
# uses: slackapi/[email protected] | |
# with: | |
# channel-id: '@nboldt' | |
# #channel-id: 'forum-che-release,@sdawley,@mkuznets' | |
# payload-file-path: "./message.json" | |
# env: | |
# SLACK_BOT_TOKEN: ${{ secrets.ECLIPSE_CHE_RELEASE_BOT_TOKEN}} |