From 45f7bfe2b34a3a1dafb4210774f90b72a51affb8 Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 4 Dec 2023 17:43:03 -0700 Subject: [PATCH 1/7] Adding release procedures for other repos to use --- .github/CODE_FREEZE_PR_TEMPLATE.md | 11 + .../actions/configure-morpheus-bot/action.yml | 50 ++++ .github/workflows/release.yml | 82 ++++++ .github/workflows/release_procedures.yml | 254 ++++++++++++++++++ ci/release/pr_code_freeze_template.md | 6 +- 5 files changed, 400 insertions(+), 3 deletions(-) create mode 100644 .github/CODE_FREEZE_PR_TEMPLATE.md create mode 100644 .github/actions/configure-morpheus-bot/action.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/release_procedures.yml diff --git a/.github/CODE_FREEZE_PR_TEMPLATE.md b/.github/CODE_FREEZE_PR_TEMPLATE.md new file mode 100644 index 0000000..62f0e82 --- /dev/null +++ b/.github/CODE_FREEZE_PR_TEMPLATE.md @@ -0,0 +1,11 @@ +## :snowflake: Code freeze for `branch-${CURRENT_VERSION}` and `v${CURRENT_VERSION}` release + +### What does this mean? +Only critical/hotfix level issues should be merged into `branch-${CURRENT_VERSION}` until release (merging of this PR). + +All other development PRs should be retargeted towards the next release branch: `branch-${NEXT_VERSION}`. + +### What is the purpose of this PR? +- Update documentation +- Allow testing for the new release +- Enable a means to merge `branch-${CURRENT_VERSION}` into `main` for the release diff --git a/.github/actions/configure-morpheus-bot/action.yml b/.github/actions/configure-morpheus-bot/action.yml new file mode 100644 index 0000000..13f45d8 --- /dev/null +++ b/.github/actions/configure-morpheus-bot/action.yml @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Configure Morpheus Bot + +inputs: + bot-app-id: + description: 'The app id of the bot' + required: true + type: string + bot-private-key: + description: 'The private key of the bot' + required: true + type: string +outputs: + token: + description: 'The token generated for the bot' + value: ${{steps.generate-token.outputs.token }} + +runs: + using: "composite" + steps: + - name: Generate Token + uses: actions/create-github-app-token@v1 + id: generate-token + with: + app-id: ${{ inputs.bot-app-id }} + private-key: ${{ inputs.bot-private-key }} + - name: Configure Git + shell: bash + run: | + git config --global user.name "morpheus-bot-test[bot]" + git config --global user.email "152534332+morpheus-bot-test[bot]@users.noreply.github.com" + echo "GITHUB_TOKEN=${{ steps.generate-token.outputs.token }}" >> "$GITHUB_ENV" + echo "Git config:" + git config -l --show-origin + echo "Github Auth Info:" + gh auth status diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..822b958 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,82 @@ +# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Release + +permissions: + contents: write + pull-requests: write + +on: + workflow_dispatch: + inputs: + current_version_array: + description: 'Current full version of the project expressed as a JSON array (e.g. `["24", "03", "00"]`)' + required: true + type: string + default: '["24", "03", "00"]' + next_version_array: + description: 'Next full version of the project as a JSON array (e.g. `["24", "07", "00"]`)' + required: true + type: string + default: '["24", "07", "00"]' + create_codefreeze_pr: + description: 'Create/Update the codefreeze PR' + required: true + type: boolean + default: false + create_next_release_branch: + description: 'Creates the next release branch and configures tags' + required: true + type: boolean + default: false + update_next_release_versions: + description: 'Runs the update-version and commits the changes to the next release branch' + required: true + type: boolean + default: false + update_changelog: + description: 'Updates the CHANGELOG.md file for the current release and commits the changes to the current release branch' + required: true + type: boolean + default: false + merge_release_branch: + description: 'Merges the code freeze release branch, creates the release tag, and creates a new Github release' + required: true + type: boolean + default: false + +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# REPO_NAME: ${{ github.event.repository.name }} +# CURRENT_VERSION: ${{ format('{0}.{1}', fromJson(inputs.current_version_array)[0], fromJson(inputs.current_version_array)[1]) }} +# CURRENT_FULL_VERSION: ${{ format('{0}.{1}.{2}', fromJson(inputs.current_version_array)[0], fromJson(inputs.current_version_array)[1], fromJson(inputs.current_version_array)[2]) }} +# NEXT_VERSION: ${{ format('{0}.{1}', fromJson(inputs.next_version_array)[0], fromJson(inputs.next_version_array)[1]) }} +# NEXT_FULL_VERSION: ${{ format('{0}.{1}.{2}', fromJson(inputs.next_version_array)[0], fromJson(inputs.next_version_array)[1], fromJson(inputs.next_version_array)[2]) }} + +jobs: + release_procedures: + uses: nv-morpheus/utilities/.github/workflows/release_procedures + with: + current_version_array: ${{ inputs.current_version_array }} + next_version_array: ${{ inputs.next_version_array }} + create_codefreeze_pr: ${{ inputs.create_codefreeze_pr }} + create_next_release_branch: ${{ inputs.create_next_release_branch }} + update_next_release_versions: ${{ inputs.update_next_release_versions }} + update_changelog: ${{ inputs.update_changelog }} + merge_release_branch: ${{ inputs.merge_release_branch }} + secrets: + ACTIONS_APP_ID: ${{ secrets.ACTIONS_APP_ID }} + ACTIONS_APP_KEY: ${{ secrets.ACTIONS_APP_KEY }} diff --git a/.github/workflows/release_procedures.yml b/.github/workflows/release_procedures.yml new file mode 100644 index 0000000..a834e2d --- /dev/null +++ b/.github/workflows/release_procedures.yml @@ -0,0 +1,254 @@ +# SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Release Procedures + +permissions: + contents: write + pull-requests: write + +on: + workflow_dispatch: + inputs: + current_version_array: + description: 'Current full version of the project expressed as a JSON array (e.g. `["24", "03", "00"]`)' + required: true + type: string + default: '["24", "03", "00"]' + next_version_array: + description: 'Next full version of the project as a JSON array (e.g. `["24", "07", "00"]`)' + required: true + type: string + default: '["24", "07", "00"]' + create_codefreeze_pr: + description: 'Create/Update the codefreeze PR' + required: true + type: boolean + default: false + create_next_release_branch: + description: 'Creates the next release branch and configures tags' + required: true + type: boolean + default: false + update_next_release_versions: + description: 'Runs the update-version and commits the changes to the next release branch' + required: true + type: boolean + default: false + update_changelog: + description: 'Updates the CHANGELOG.md file for the current release and commits the changes to the current release branch' + required: true + type: boolean + default: false + merge_release_branch: + description: 'Merges the code freeze release branch, creates the release tag, and creates a new Github release' + required: true + type: boolean + default: false + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO_NAME: ${{ github.event.repository.name }} + CURRENT_VERSION: ${{ format('{0}.{1}', fromJson(inputs.current_version_array)[0], fromJson(inputs.current_version_array)[1]) }} + CURRENT_FULL_VERSION: ${{ format('{0}.{1}.{2}', fromJson(inputs.current_version_array)[0], fromJson(inputs.current_version_array)[1], fromJson(inputs.current_version_array)[2]) }} + NEXT_VERSION: ${{ format('{0}.{1}', fromJson(inputs.next_version_array)[0], fromJson(inputs.next_version_array)[1]) }} + NEXT_FULL_VERSION: ${{ format('{0}.{1}.{2}', fromJson(inputs.next_version_array)[0], fromJson(inputs.next_version_array)[1], fromJson(inputs.next_version_array)[2]) }} + +jobs: + create_codefreeze_pr: + if: ${{ inputs.create_codefreeze_pr }} + name: Create Codefreeze PR + runs-on: ubuntu-latest + steps: + - name: Configure Bot + id: configure-bot + uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + with: + bot-app-id: ${{ secrets.ACTIONS_APP_ID }} + bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} + - name: Checkout + uses: actions/checkout@v4 + with: + path: utilities + ref: branch-${{ env.CURRENT_VERSION }} + token: ${{ steps.configure-bot.outputs.token }} + sparse-checkout: | + .github/CODE_FREEZE_PR_TEMPLATE.md + sparse-checkout-cone-mode: false + - name: Create PR + run: | + cat utilities/.github/CODE_FREEZE_PR_TEMPLATE.md | envsubst | \ + gh pr create --repo ${{ github.repository }} \ + --base main --head branch-${CURRENT_VERSION} \ + --title "[RELEASE] ${REPO_NAME} v${CURRENT_FULL_VERSION}" \ + --body-file - \ + --label "! - Release" + create_next_release_branch: + if: ${{ inputs.create_next_release_branch }} + name: Create Next Release Branch + runs-on: ubuntu-latest + steps: + - name: Configure Bot + id: configure-bot + uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + with: + bot-app-id: ${{ secrets.ACTIONS_APP_ID }} + bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} + - name: Checkout + uses: actions/checkout@v4 + with: + path: ${{ env.REPO_NAME }} + ref: branch-${{ env.CURRENT_VERSION }} + fetch-depth: 0 # Fetch all history for all tags and branches + token: ${{ steps.configure-bot.outputs.token }} + - name: Create branch + run: | + cd ${REPO_NAME} + + # Double check the auth status + gh auth status + git checkout -b branch-${NEXT_VERSION} + git commit --allow-empty -m "Creating branch for v${NEXT_VERSION}" + git tag -a -m "Alpha release of v${NEXT_VERSION}" v${NEXT_FULL_VERSION}a + git push origin branch-${NEXT_VERSION} v${NEXT_FULL_VERSION}a + - name: Set default branch + run: | + gh repo edit ${{ github.repository }} --default-branch branch-${NEXT_VERSION} + + update_next_release_versions: + if: ${{ always() && inputs.update_next_release_versions }} + name: Update Next Release Versions + needs: [create_next_release_branch] + runs-on: ubuntu-latest + steps: + - name: Configure Bot + id: configure-bot + uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + with: + bot-app-id: ${{ secrets.ACTIONS_APP_ID }} + bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: false + path: ${{ env.REPO_NAME }} + ref: branch-${{ env.NEXT_VERSION }} + token: ${{ steps.configure-bot.outputs.token }} + submodules: recursive + - name: Run update script + run: | + cd ${REPO_NAME} + + # Run the update-versions script and commit all changes + ./ci/release/update-version.sh ${CURRENT_FULL_VERSION} ${NEXT_FULL_VERSION} + git add . + git commit -m "Updating versions for v${NEXT_FULL_VERSION}" + + # Push the changes + git push origin branch-${NEXT_VERSION} + + update_changelog: + if: ${{ inputs.update_changelog }} + name: Update Changelog + runs-on: ubuntu-latest + steps: + - name: Configure Bot + id: configure-bot + uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + with: + bot-app-id: ${{ secrets.ACTIONS_APP_ID }} + bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} + - name: Checkout + uses: actions/checkout@v4 + with: + lfs: false + path: ${{ env.REPO_NAME }} + ref: branch-${{ env.CURRENT_VERSION }} + token: ${{ steps.configure-bot.outputs.token }} + - name: Update the CHANGELOG.md file + run: | + cd ${REPO_NAME} + + # Get the release notes from the current nightly release + RELEASE_NOTES=$(gh release view v${CURRENT_FULL_VERSION}a --repo ${{ github.repository }} --json body | jq -r '.body' | tail -n +6) + + echo "RELEASE_NOTES=${RELEASE_NOTES}" + + # Update the CHANGELOG.md file + echo -e "# ${REPO_NAME} ${CURRENT_FULL_VERSION} ($(date +"%d %b %Y"))\n\n${RELEASE_NOTES}\n\n$(cat CHANGELOG.md)" > CHANGELOG.md + + # Update the links + export PR_URL_PREFIX="https://github.com/${{ github.repository }}/pull/" + export GH_URL="https://github.com" + sed -i "s|(#\([[:digit:]]*\))|([#\1](${PR_URL_PREFIX}\1))|g" CHANGELOG.md + sed -i "s|@\([a-zA-Z0-9\-]\{1,39\}\)$|[@\1](${GH_URL}/\1)|g" CHANGELOG.md + + # # Commit the changes + # git add CHANGELOG.md + # git commit -m "Updating CHANGELOG" + # git push origin branch-${CURRENT_VERSION} + cat CHANGELOG.md + + merge_release_branch: + if: ${{ inputs.merge_release_branch }} + name: Merge Release Branch + runs-on: ubuntu-latest + steps: + - name: Configure Bot + id: configure-bot + uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + with: + bot-app-id: ${{ secrets.ACTIONS_APP_ID }} + bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} + - name: Find Matching Release PRs + id: find_matching_prs + run: | + set -x + PR_LIST=$(gh pr list --repo ${{ github.repository }} --base main --head branch-${CURRENT_VERSION} --label "! - Release" --state open --json number) + if [[ $(echo "${PR_LIST}" | jq length) != 1 ]]; then + echo "::error Found multiple PRs for the current release. Please close all but one PR and try again. Matched PRs: ${PR_LIST}" + exit 1 + fi + + # Save the PR number to an output variable + echo "pr_number=$(echo ${PR_LIST} | jq -r '.[0].number')" >> $GITHUB_OUTPUT + - name: Merge the release PR + run: | + PR_NUMBER=${{ steps.find_matching_prs.outputs.pr_number }} + gh pr merge ${PR_NUMBER} --repo ${{ github.repository }} --merge + - name: Checkout main branch + uses: actions/checkout@v4 + with: + lfs: false + path: ${{ env.REPO_NAME }} + ref: main + fetch-tags: true # Fetch all tags + token: ${{ steps.configure-bot.outputs.token }} + - name: Create release commit and tag + run: | + cd ${REPO_NAME} + git commit --allow-empty -m "REL v${CURRENT_FULL_VERSION} release" + git tag -a -m "$(date +"%B %Y") Release" v${CURRENT_FULL_VERSION} + git push origin main v${CURRENT_FULL_VERSION} + - name: Create Github release + run: | + # Get the release body from the current nightly release + RELEASE_BODY=$(gh release view v${CURRENT_FULL_VERSION}a --repo ${{ github.repository }} --json body | jq -r '.body' | tail -n +6) + + # Build the release for Github + gh release create v${CURRENT_FULL_VERSION} --repo ${{ github.repository }} \ + --title "v${CURRENT_FULL_VERSION}" \ + --notes "${RELEASE_BODY}" \ + --verify-tag diff --git a/ci/release/pr_code_freeze_template.md b/ci/release/pr_code_freeze_template.md index 99642f7..62f0e82 100644 --- a/ci/release/pr_code_freeze_template.md +++ b/ci/release/pr_code_freeze_template.md @@ -1,11 +1,11 @@ -## :snowflake: Code freeze for `branch-${VERSION}` and `v${VERSION}` release +## :snowflake: Code freeze for `branch-${CURRENT_VERSION}` and `v${CURRENT_VERSION}` release ### What does this mean? -Only critical/hotfix level issues should be merged into `branch-${VERSION}` until release (merging of this PR). +Only critical/hotfix level issues should be merged into `branch-${CURRENT_VERSION}` until release (merging of this PR). All other development PRs should be retargeted towards the next release branch: `branch-${NEXT_VERSION}`. ### What is the purpose of this PR? - Update documentation - Allow testing for the new release -- Enable a means to merge `branch-${VERSION}` into `main` for the release +- Enable a means to merge `branch-${CURRENT_VERSION}` into `main` for the release From 42b11243492f27367b860c147a7bdf2ed4f34e74 Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 4 Dec 2023 17:51:13 -0700 Subject: [PATCH 2/7] Debugging release procedures --- .github/workflows/release.yml | 2 +- .github/workflows/release_procedures.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 822b958..3bc1f77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,7 +68,7 @@ on: jobs: release_procedures: - uses: nv-morpheus/utilities/.github/workflows/release_procedures + uses: nv-morpheus/utilities/.github/workflows/release_procedures.yml@mdd_release-procedures with: current_version_array: ${{ inputs.current_version_array }} next_version_array: ${{ inputs.next_version_array }} diff --git a/.github/workflows/release_procedures.yml b/.github/workflows/release_procedures.yml index a834e2d..c485d0e 100644 --- a/.github/workflows/release_procedures.yml +++ b/.github/workflows/release_procedures.yml @@ -20,7 +20,7 @@ permissions: pull-requests: write on: - workflow_dispatch: + workflow_call: inputs: current_version_array: description: 'Current full version of the project expressed as a JSON array (e.g. `["24", "03", "00"]`)' From 45a319e0ee4429ff2b9f8f106fa354921973014f Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 4 Dec 2023 17:53:47 -0700 Subject: [PATCH 3/7] Debugging release procedures --- .github/workflows/release_procedures.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release_procedures.yml b/.github/workflows/release_procedures.yml index c485d0e..90f45b0 100644 --- a/.github/workflows/release_procedures.yml +++ b/.github/workflows/release_procedures.yml @@ -57,6 +57,13 @@ on: required: true type: boolean default: false + secrets: + ACTIONS_APP_ID: + description: 'The Github App ID for the bot' + required: true + ACTIONS_APP_KEY: + description: 'The private key for the Github App' + required: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d31fb7db76154b467ad0c59281409609f756ed02 Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 4 Dec 2023 18:00:27 -0700 Subject: [PATCH 4/7] Debugging release procedures --- .github/workflows/release_procedures.yml | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release_procedures.yml b/.github/workflows/release_procedures.yml index 90f45b0..d4a1e91 100644 --- a/.github/workflows/release_procedures.yml +++ b/.github/workflows/release_procedures.yml @@ -81,7 +81,7 @@ jobs: steps: - name: Configure Bot id: configure-bot - uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + uses: nv-morpheus/utilities/.github/actions/configure-morpheus-bot@mdd_release-procedures with: bot-app-id: ${{ secrets.ACTIONS_APP_ID }} bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} @@ -89,19 +89,21 @@ jobs: uses: actions/checkout@v4 with: path: utilities - ref: branch-${{ env.CURRENT_VERSION }} + repository: nv-morpheus/utilities + # ref: branch-${{ env.CURRENT_VERSION }} token: ${{ steps.configure-bot.outputs.token }} sparse-checkout: | .github/CODE_FREEZE_PR_TEMPLATE.md sparse-checkout-cone-mode: false - name: Create PR run: | - cat utilities/.github/CODE_FREEZE_PR_TEMPLATE.md | envsubst | \ - gh pr create --repo ${{ github.repository }} \ - --base main --head branch-${CURRENT_VERSION} \ - --title "[RELEASE] ${REPO_NAME} v${CURRENT_FULL_VERSION}" \ - --body-file - \ - --label "! - Release" + cat utilities/.github/CODE_FREEZE_PR_TEMPLATE.md + # cat utilities/.github/CODE_FREEZE_PR_TEMPLATE.md | envsubst | \ + # gh pr create --repo ${{ github.repository }} \ + # --base main --head branch-${CURRENT_VERSION} \ + # --title "[RELEASE] ${REPO_NAME} v${CURRENT_FULL_VERSION}" \ + # --body-file - \ + # --label "! - Release" create_next_release_branch: if: ${{ inputs.create_next_release_branch }} name: Create Next Release Branch @@ -109,7 +111,7 @@ jobs: steps: - name: Configure Bot id: configure-bot - uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + uses: nv-morpheus/utilities/.github/actions/configure-morpheus-bot@mdd_release-procedures with: bot-app-id: ${{ secrets.ACTIONS_APP_ID }} bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} @@ -142,7 +144,7 @@ jobs: steps: - name: Configure Bot id: configure-bot - uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + uses: nv-morpheus/utilities/.github/actions/configure-morpheus-bot@mdd_release-procedures with: bot-app-id: ${{ secrets.ACTIONS_APP_ID }} bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} @@ -173,7 +175,7 @@ jobs: steps: - name: Configure Bot id: configure-bot - uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + uses: nv-morpheus/utilities/.github/actions/configure-morpheus-bot@mdd_release-procedures with: bot-app-id: ${{ secrets.ACTIONS_APP_ID }} bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} @@ -215,7 +217,7 @@ jobs: steps: - name: Configure Bot id: configure-bot - uses: nv-morpheus/morpheus-visualizations/.github/actions/configure-morpheus-bot@mdd_test-release-procedures + uses: nv-morpheus/utilities/.github/actions/configure-morpheus-bot@mdd_release-procedures with: bot-app-id: ${{ secrets.ACTIONS_APP_ID }} bot-private-key: ${{ secrets.ACTIONS_APP_KEY }} From 04e487124352ed7b6028e8a41f4b7e6fd5d5fa8f Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 4 Dec 2023 18:07:17 -0700 Subject: [PATCH 5/7] Debugging release procedures --- .github/workflows/release_procedures.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release_procedures.yml b/.github/workflows/release_procedures.yml index d4a1e91..dc8197b 100644 --- a/.github/workflows/release_procedures.yml +++ b/.github/workflows/release_procedures.yml @@ -56,7 +56,6 @@ on: description: 'Merges the code freeze release branch, creates the release tag, and creates a new Github release' required: true type: boolean - default: false secrets: ACTIONS_APP_ID: description: 'The Github App ID for the bot' From 4ccaaa8667eb01aac5c859e7defbf39b85b3716b Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 4 Dec 2023 18:16:51 -0700 Subject: [PATCH 6/7] Debugging release procedures --- .github/workflows/release.yml | 12 +----------- .github/workflows/release_procedures.yml | 13 ++++++------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bc1f77..524fb6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,14 +58,6 @@ on: type: boolean default: false -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# REPO_NAME: ${{ github.event.repository.name }} -# CURRENT_VERSION: ${{ format('{0}.{1}', fromJson(inputs.current_version_array)[0], fromJson(inputs.current_version_array)[1]) }} -# CURRENT_FULL_VERSION: ${{ format('{0}.{1}.{2}', fromJson(inputs.current_version_array)[0], fromJson(inputs.current_version_array)[1], fromJson(inputs.current_version_array)[2]) }} -# NEXT_VERSION: ${{ format('{0}.{1}', fromJson(inputs.next_version_array)[0], fromJson(inputs.next_version_array)[1]) }} -# NEXT_FULL_VERSION: ${{ format('{0}.{1}.{2}', fromJson(inputs.next_version_array)[0], fromJson(inputs.next_version_array)[1], fromJson(inputs.next_version_array)[2]) }} - jobs: release_procedures: uses: nv-morpheus/utilities/.github/workflows/release_procedures.yml@mdd_release-procedures @@ -77,6 +69,4 @@ jobs: update_next_release_versions: ${{ inputs.update_next_release_versions }} update_changelog: ${{ inputs.update_changelog }} merge_release_branch: ${{ inputs.merge_release_branch }} - secrets: - ACTIONS_APP_ID: ${{ secrets.ACTIONS_APP_ID }} - ACTIONS_APP_KEY: ${{ secrets.ACTIONS_APP_KEY }} + secrets: inherit diff --git a/.github/workflows/release_procedures.yml b/.github/workflows/release_procedures.yml index dc8197b..57551c4 100644 --- a/.github/workflows/release_procedures.yml +++ b/.github/workflows/release_procedures.yml @@ -96,13 +96,12 @@ jobs: sparse-checkout-cone-mode: false - name: Create PR run: | - cat utilities/.github/CODE_FREEZE_PR_TEMPLATE.md - # cat utilities/.github/CODE_FREEZE_PR_TEMPLATE.md | envsubst | \ - # gh pr create --repo ${{ github.repository }} \ - # --base main --head branch-${CURRENT_VERSION} \ - # --title "[RELEASE] ${REPO_NAME} v${CURRENT_FULL_VERSION}" \ - # --body-file - \ - # --label "! - Release" + cat utilities/.github/CODE_FREEZE_PR_TEMPLATE.md | envsubst | \ + gh pr create --repo ${{ github.repository }} \ + --base main --head branch-${CURRENT_VERSION} \ + --title "[RELEASE] ${REPO_NAME} v${CURRENT_FULL_VERSION}" \ + --body-file - \ + --label "! - Release" create_next_release_branch: if: ${{ inputs.create_next_release_branch }} name: Create Next Release Branch From 9bf4817056c304cd0258dc194ca6026d18767f27 Mon Sep 17 00:00:00 2001 From: Michael Demoret Date: Mon, 4 Dec 2023 18:19:18 -0700 Subject: [PATCH 7/7] Debugging release procedures --- ci/release/pr_code_freeze_template.md | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 ci/release/pr_code_freeze_template.md diff --git a/ci/release/pr_code_freeze_template.md b/ci/release/pr_code_freeze_template.md deleted file mode 100644 index 62f0e82..0000000 --- a/ci/release/pr_code_freeze_template.md +++ /dev/null @@ -1,11 +0,0 @@ -## :snowflake: Code freeze for `branch-${CURRENT_VERSION}` and `v${CURRENT_VERSION}` release - -### What does this mean? -Only critical/hotfix level issues should be merged into `branch-${CURRENT_VERSION}` until release (merging of this PR). - -All other development PRs should be retargeted towards the next release branch: `branch-${NEXT_VERSION}`. - -### What is the purpose of this PR? -- Update documentation -- Allow testing for the new release -- Enable a means to merge `branch-${CURRENT_VERSION}` into `main` for the release