From 358d42c9cd030ca55b6c001049c4e6db23e92267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 12:49:15 +0200 Subject: [PATCH 01/15] release-drafter autolabeling config --- .github/release-drafter.yml | 63 ++++++++++++++++++++++++--- .github/workflows/release-drafter.yml | 6 ++- 2 files changed, 60 insertions(+), 9 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index c92515668..350bb0428 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -2,18 +2,25 @@ filter-by-commitish: true categories: - title: '🔥 Features' labels: + - 'features' + - title: '🚀 Enhancemets' + labels: + - 'performance' - 'enhancement' - title: '🐛 Bug Fixes' labels: + - 'bug' - 'bug :bug:' - - title: 'Google Summer of Code 2022' - label: 'GSoC22' - title: '💯 Benchmarking' label: 'benchmarking' - title: '📜 Documentation' - label: 'documentation :book:' - - title: ' Testing' + labels: + - 'documentation' + - title: 'Testing' label: 'testing' + - title: '🔒 Security' + labels: + - 'security' - title: 'Arithmetic' label: 'arithmetic' - title: 'Array API' @@ -75,8 +82,10 @@ categories: label: 'rounding' - title: 'Sanitation' label: 'sanitation' - - title: 'Signal' - label: 'signal' + - title: 'Signal Processing' + labels: + - 'signal' + - 'signal processing' - title: 'Sparse' label: 'sparse' - title: 'Spatial' @@ -97,9 +106,49 @@ exclude-labels: - 'chore' - 'workflows' autolabeler: + - label: 'workflows' + files: + - '.github/workflows' + title: + - 'Workflow.+' - label: 'chore' title: - - '\[pre-commit.ci\] .*' + - '\[pre-commit.ci\].+' + - label: 'features' + title: + - 'Features/.+' + - 'feat:.+' + branch: + - 'features/.+' + - label: 'enhancement' + title: + - 'Refactor.+' + - 'Expand.+' + - label: 'documentation' + files: + - 'doc/' + - '*.md' + - label: 'benchmarking' + files: + - 'benchmarks/' + - label: 'docker' + files: + - 'docker/' + - label: 'bug' + title: + - '\[Bug\]:.+' + - 'Bug/.+' + - 'Resolve.+' + - 'Fix.+' + branch: + - 'bug/.+' + - label: 'interoperability' + title: + - 'Support.+' + - label: 'testing' + files: + - '**/tests/*' + change-template: '- #$NUMBER $TITLE (by @$AUTHOR)' category-template: '### $TITLE' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 470ae27fc..307a5112f 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,7 +2,7 @@ name: Release Drafter on: pull_request_target: - types: [closed] + types: [opened, reopened, synchronize, labeled, closed] permissions: contents: read @@ -19,6 +19,8 @@ jobs: with: egress-policy: audit - - uses: release-drafter/release-drafter@09c613e259eb8d4e7c81c2cb00618eb5fc4575a7 # v5.25.0 + - uses: release-drafter/release-drafter@v6 # v6.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + commitish: ${{ github.ref }} From 98866cee29eaba963002a08e2f6d3adf96c2aa4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 13:05:04 +0200 Subject: [PATCH 02/15] tmp change to pull_request from pull_request_target --- .github/workflows/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 307a5112f..0b0ccfcb5 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,7 +1,7 @@ name: Release Drafter on: - pull_request_target: + pull_request: types: [opened, reopened, synchronize, labeled, closed] permissions: From 217d43ff435a83cdc0b7d4cecd6097cfb51157e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 13:17:07 +0200 Subject: [PATCH 03/15] correct commitish --- .github/workflows/release-drafter.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 0b0ccfcb5..23bb91781 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -3,10 +3,6 @@ name: Release Drafter on: pull_request: types: [opened, reopened, synchronize, labeled, closed] - -permissions: - contents: read - jobs: update_release_draft: permissions: @@ -23,4 +19,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - commitish: ${{ github.ref }} + + commitish: ${{ github.event.pull_request.base.ref }} From 13076c3d35986cbd465413a3c34968530067a35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 13:27:27 +0200 Subject: [PATCH 04/15] not filter by-commitish --- .github/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 350bb0428..ebf422c79 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,4 @@ -filter-by-commitish: true +filter-by-commitish: false categories: - title: '🔥 Features' labels: From 85e267609d74fe592101bd126d41c600ebd6fc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 14:00:07 +0200 Subject: [PATCH 05/15] test autolable --- .github/release-drafter.yml | 2 +- .github/workflows/release-drafter.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index ebf422c79..3d3ed3bfa 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -108,7 +108,7 @@ exclude-labels: autolabeler: - label: 'workflows' files: - - '.github/workflows' + - '.github/**' title: - 'Workflow.+' - label: 'chore' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 23bb91781..d043af839 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,7 +2,7 @@ name: Release Drafter on: pull_request: - types: [opened, reopened, synchronize, labeled, closed] + types: [opened, reopened, synchronize, closed] jobs: update_release_draft: permissions: From 9aee6e207f1d17a461984644a735b08e62b7d6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 14:12:02 +0200 Subject: [PATCH 06/15] autolabeler, second try --- .github/release-drafter.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 3d3ed3bfa..b285d14c2 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,5 @@ -filter-by-commitish: false +filter-by-commitish: true +include-pre-releases: true categories: - title: '🔥 Features' labels: @@ -108,7 +109,7 @@ exclude-labels: autolabeler: - label: 'workflows' files: - - '.github/**' + - '.github/**/*' title: - 'Workflow.+' - label: 'chore' @@ -126,14 +127,14 @@ autolabeler: - 'Expand.+' - label: 'documentation' files: - - 'doc/' + - 'doc/**/*' - '*.md' - label: 'benchmarking' files: - 'benchmarks/' - label: 'docker' files: - - 'docker/' + - 'docker/**/*' - label: 'bug' title: - '\[Bug\]:.+' @@ -147,7 +148,7 @@ autolabeler: - 'Support.+' - label: 'testing' files: - - '**/tests/*' + - '**/tests/**/*' change-template: '- #$NUMBER $TITLE (by @$AUTHOR)' From aeafaa39e007fa9f802e952aca19dc92a9fc64cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 14:38:17 +0200 Subject: [PATCH 07/15] check that changes are being reflected on the draft release --- .github/release-drafter.yml | 2 +- .github/workflows/release-drafter.yml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index b285d14c2..7979051b6 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,7 +1,7 @@ filter-by-commitish: true include-pre-releases: true categories: - - title: '🔥 Features' + - title: '🔥🔥 Features' labels: - 'features' - title: '🚀 Enhancemets' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index d043af839..582235df0 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -18,6 +18,5 @@ jobs: - uses: release-drafter/release-drafter@v6 # v6.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - - commitish: ${{ github.event.pull_request.base.ref }} + # with: + # commitish: ${{ github.event.pull_request.base.ref }} From 5f58ee9b089bc3dc38b8a0a672ed7dd29c451ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 14:49:42 +0200 Subject: [PATCH 08/15] testing if main is the answer --- .github/workflows/release-drafter.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 582235df0..5ae0da49e 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -18,5 +18,5 @@ jobs: - uses: release-drafter/release-drafter@v6 # v6.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # commitish: ${{ github.event.pull_request.base.ref }} + with: + commitish: "main" From c7bdb378c5159c4f45168fc955d256b29f30d8eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 15:03:15 +0200 Subject: [PATCH 09/15] trying to make changes visible --- .github/{release-drafter.yml => rd-release-config.yml} | 0 .github/workflows/release-drafter.yml | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) rename .github/{release-drafter.yml => rd-release-config.yml} (100%) diff --git a/.github/release-drafter.yml b/.github/rd-release-config.yml similarity index 100% rename from .github/release-drafter.yml rename to .github/rd-release-config.yml diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 5ae0da49e..2b00af974 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -19,4 +19,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - commitish: "main" + commitish: ${{ github.event.pull_request.base.ref }} + config-name: rd-release-config.yml From 72f093dab50aa11d6891e6703001d75a40f45afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 15:08:12 +0200 Subject: [PATCH 10/15] still trying to see some changes --- .github/workflows/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 2b00af974..dba54c709 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -19,5 +19,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - commitish: ${{ github.event.pull_request.base.ref }} + # commitish: ${{ github.event.pull_request.base.ref }} config-name: rd-release-config.yml From d424937dab09093c5dbcd45acce205c512b02be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Tue, 15 Oct 2024 15:17:59 +0200 Subject: [PATCH 11/15] last state, need to test on a fork --- .github/workflows/release-drafter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index dba54c709..2b00af974 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -19,5 +19,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - # commitish: ${{ github.event.pull_request.base.ref }} + commitish: ${{ github.event.pull_request.base.ref }} config-name: rd-release-config.yml From 9cec5261487903830acb0f93191cd214b9252828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Wed, 16 Oct 2024 09:55:10 +0200 Subject: [PATCH 12/15] complete autolabeler configuration --- .github/rd-release-config.yml | 150 +++++++++++++------------- .github/workflows/release-drafter.yml | 10 +- 2 files changed, 84 insertions(+), 76 deletions(-) diff --git a/.github/rd-release-config.yml b/.github/rd-release-config.yml index 7979051b6..f98d1e7e8 100644 --- a/.github/rd-release-config.yml +++ b/.github/rd-release-config.yml @@ -1,5 +1,5 @@ -filter-by-commitish: true -include-pre-releases: true +filter-by-commitish: False +include-pre-releases: false categories: - title: '🔥🔥 Features' labels: @@ -22,134 +22,138 @@ categories: - title: '🔒 Security' labels: - 'security' - - title: 'Arithmetic' - label: 'arithmetic' - - title: 'Array API' - label: 'array API' + - title: 'Core' + label: 'core' - title: 'Classification' label: 'classification' - title: 'Cluster' label: 'cluster' - - title: 'Communication' - labels: - - 'io' - - 'I/O' - - 'communication' - - title: 'Complex Math' - label: 'complex math' - - title: 'Constants' - label: 'constants' - title: 'Datasets' label: 'datasets' - - title: 'Devices' - label: 'devices' - - title: 'DNDarray' - label: 'dndarray' - - title: 'Exponential' - label: 'exponential' - - title: 'Factories' - label: 'factories' + - title: 'Decomposition' + label: 'decomposition' + - title: 'FFT' + label: 'fft' - title: 'Graph' label: 'graph' - - title: 'Indexing' - label: 'indexing' - - title: 'Interoperability' - label: 'interoperability' - title: 'Linear Algebra' label: 'linalg' - - title: 'Logical' - label: 'logical' - - title: 'Manipulations' - label: 'manipulation' - - title: 'Memory' - label: 'memory' - title: 'Naive Bayes' - label: 'naive Bayes' + label: 'naive bayes' - title: 'Neural Networks' labels: - 'nn' - 'neural net' - title: 'Optimization' label: 'optim' - - title: 'Printing' - label: 'printing' - - title: 'Random' - label: 'random' + - title: 'Preprocessing' + label: 'preprocessing' - title: 'Regression' label: 'regression' - - title: 'Relational' - label: 'relational' - - title: 'Rounding' - label: 'rounding' - - title: 'Sanitation' - label: 'sanitation' - - title: 'Signal Processing' - labels: - - 'signal' - - 'signal processing' - title: 'Sparse' label: 'sparse' - title: 'Spatial' label: 'spatial' - - title: 'Statistics' - label: 'statistics' - - title: 'Stride Tricks' - label: 'stride tricks' - - title: 'Tiling' - label: 'tiling' - - title: 'Trigonometrics' - label: 'trigonometrics' - - title: 'Types' - label: 'types' + - title: 'Utils' + label: 'utils' exclude-labels: - 'github-actions' - 'dependencies' - 'chore' - 'workflows' + autolabeler: - label: 'workflows' files: - '.github/**/*' title: - - 'Workflow.+' + - '/Workflow.+/' - label: 'chore' title: - - '\[pre-commit.ci\].+' + - '/\[pre-commit.ci\].+/' - label: 'features' title: - - 'Features/.+' - - 'feat:.+' + - '/feat/i' + - '/feature/i' branch: - - 'features/.+' + - '/feature/i' + - '/feat/i' - label: 'enhancement' title: - - 'Refactor.+' - - 'Expand.+' + - '/Refactor.+/' + - '/Expand.+/' - label: 'documentation' files: - 'doc/**/*' - '*.md' - label: 'benchmarking' files: - - 'benchmarks/' + - 'benchmarks/**/*' - label: 'docker' files: - 'docker/**/*' - label: 'bug' title: - - '\[Bug\]:.+' - - 'Bug/.+' - - 'Resolve.+' - - 'Fix.+' + - '/bug/i' + - '/resolve/i' + - '/fix/i' branch: - - 'bug/.+' + - '/bug/i' + - '/fix/i' - label: 'interoperability' title: - - 'Support.+' + - '/Support.+/' - label: 'testing' files: - '**/tests/**/*' - + - label: 'classification' + files: + - 'heat/classification/**/*' + - label: 'cluster' + files: + - 'heat/cluster/**/*' + - label: 'core' + files: + - 'heat/core/**/*' + - label: 'datasets' + files: + - 'heat/datasets/**/*' + - label: 'decomposition' + files: + - 'heat/decomposition/**/*' + - label: 'fft' + files: + - 'heat/fft/**/*' + - label: 'graph' + files: + - 'heat/graph/**/*' + - label: 'naive bayes' + files: + - 'heat/naive_bayes/**/*' + - label: 'nn' + files: + - 'heat/nn/**/*' + - label: 'optim' + files: + - 'heat/optim/**/*' + - label: 'preprocessing' + files: + - 'heat/preprocessing/**/*' + - label: 'regression' + files: + - 'heat/regression/**/*' + - label: 'sparse' + files: + - 'heat/sparse/**/*' + - label: 'spatial' + files: + - 'heat/spatial/**/*' + - label: 'utils' + files: + - 'heat/utils/**/*' + - label: 'linalg' + files: + - 'heat/core/linalg/**/*' change-template: '- #$NUMBER $TITLE (by @$AUTHOR)' category-template: '### $TITLE' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 2b00af974..2a492528f 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,8 +1,11 @@ name: Release Drafter on: - pull_request: - types: [opened, reopened, synchronize, closed] + pull_request_target: + types: [opened, reopened, synchronize] + push: + branches: + - release/* jobs: update_release_draft: permissions: @@ -19,5 +22,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - commitish: ${{ github.event.pull_request.base.ref }} + commitish: ${{ github.ref_name }} + name: ${{ github.ref_name }} - Draft release config-name: rd-release-config.yml From 1e75a27eed8440d8fa9f691f92dab1f34fa40655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Wed, 16 Oct 2024 11:03:49 +0200 Subject: [PATCH 13/15] removed the second flame --- .github/rd-release-config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/rd-release-config.yml b/.github/rd-release-config.yml index f98d1e7e8..1e6a6c1f9 100644 --- a/.github/rd-release-config.yml +++ b/.github/rd-release-config.yml @@ -1,7 +1,7 @@ filter-by-commitish: False include-pre-releases: false categories: - - title: '🔥🔥 Features' + - title: '🔥 Features' labels: - 'features' - title: '🚀 Enhancemets' From 95e8152929eb8be0e26105beafdead2f99b2a07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Thu, 28 Nov 2024 17:01:14 +0100 Subject: [PATCH 14/15] ci: added updated version of claudias release-prep workflow --- .github/workflows/release-drafter.yml | 7 +-- .github/workflows/release-prep.yml | 85 +++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release-prep.yml diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 2a492528f..f655cd439 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,10 +2,7 @@ name: Release Drafter on: pull_request_target: - types: [opened, reopened, synchronize] - push: - branches: - - release/* + types: [opened, reopened, synchronize, closed] jobs: update_release_draft: permissions: @@ -22,6 +19,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - commitish: ${{ github.ref_name }} + commitish: 'release' name: ${{ github.ref_name }} - Draft release config-name: rd-release-config.yml diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml new file mode 100644 index 000000000..f22e23d73 --- /dev/null +++ b/.github/workflows/release-prep.yml @@ -0,0 +1,85 @@ +name: Prep Heat Release + +on: + workflow_dispatch: + inputs: + release_version: + description: "The version to release" + required: true + default: "0.0.0" + base_branch: + description: "The base branch to create the release branch from" + required: true + default: "main" + +permissions: + contents: write + pull-requests: write + +jobs: + release: + # environment: release + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 + with: + egress-policy: audit + + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.base_branch }} + - name: Bump version.py and create PR + env: + PR_BRANCH: pre-release/${{ inputs.release_version }} + VERSION: ${{ inputs.release_version }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + # Create branch + git checkout -b pre-release/${VERSION} + + # Split version number into major, minor, and micro + MAYOR=$(echo $VERSION | cut -d. -f1) + MINOR=$(echo $VERSION | cut -d. -f2) + MICRO=$(echo $VERSION | cut -d. -f3) + + # Write on to the version.py file + sed -i "s/major: int = \([0-9]\+\)/major: int = $MAYOR/g" heat/core/version.py + sed -i "s/minor: int = \([0-9]\+\)/minor: int = $MINOR/g" heat/core/version.py + sed -i "s/micro: int = \([0-9]\+\)/micro: int = $MICRO/g" heat/core/version.py + sed -i "s/extension: str = .*/extension: str = None/g" heat/core/version.py + + # Git configuration with anonymous user and email + git config --global user.email "" + git config --global user.name "Heat Release Bot" + + # Commit the changes + git add heat/core/version.py + git commit -m "Bump version to $VERSION" + + # Push the changes + git push --set-upstream origin pre-release/${VERSION} + + # Create PR for release + gh pr create \ + --base release \ + --head ${{ env.PR_BRANCH }} \ + --title "Heat ${{ env.VERSION }} - Release" \ + --body "Pre-release branch for Heat ${{ env.VERSION }}. + Any release work should be done on this branch, and then merged into the release branch and main, following git-flow. + + TODO: + - [x] Update version.py + - [ ] update the Requirements section on README.md if needed + - [ ] Update CITATION.cff if needed + - [ ] Ensure the Changelog is up to date + + [1]: https://github.com/peter-evans/create-pull-request" \ + --label invalid + + # Create PR for main + gh pr create --base main \ + --head ${{ env.PR_BRANCH }} \ + --title "Heat ${{ env.VERSION }} - Main" \ + --body "Copy of latest pre-release PR targeting release." \ + --label invalid From c84c303851f95f74b3f9149f29119a66b7bd7055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guti=C3=A9rrez=20Hermosillo=20Muriedas=2C=20Juan=20Pedro?= Date: Mon, 9 Dec 2024 15:00:53 +0100 Subject: [PATCH 15/15] post-review commit --- .github/rd-release-config.yml | 24 +++++++++++++++++------- .github/workflows/release-drafter.yml | 4 ++-- .github/workflows/release-prep.yml | 4 ++-- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/rd-release-config.yml b/.github/rd-release-config.yml index 1e6a6c1f9..6f1d103d2 100644 --- a/.github/rd-release-config.yml +++ b/.github/rd-release-config.yml @@ -1,25 +1,24 @@ filter-by-commitish: False include-pre-releases: false categories: - - title: '🔥 Features' + - title: 'Features' labels: - 'features' - - title: '🚀 Enhancemets' + - title: 'Enhancements' labels: - 'performance' - 'enhancement' - - title: '🐛 Bug Fixes' + - title: 'Bug Fixes' labels: - 'bug' - - 'bug :bug:' - - title: '💯 Benchmarking' + - title: 'Benchmarking' label: 'benchmarking' - - title: '📜 Documentation' + - title: 'Documentation' labels: - 'documentation' - title: 'Testing' label: 'testing' - - title: '🔒 Security' + - title: 'Security' labels: - 'security' - title: 'Core' @@ -75,6 +74,9 @@ autolabeler: title: - '/feat/i' - '/feature/i' + - '/implement/i' + - '/add/i' + - '/new/i' branch: - '/feature/i' - '/feat/i' @@ -92,6 +94,14 @@ autolabeler: - label: 'docker' files: - 'docker/**/*' + - label: 'backport release' + title: + - '/bug/i' + - '/resolve/i' + - '/fix/i' + branch: + - '/bug/i' + - '/fix/i' - label: 'bug' title: - '/bug/i' diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index f655cd439..f599bb28e 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -2,7 +2,7 @@ name: Release Drafter on: pull_request_target: - types: [opened, reopened, synchronize, closed] + types: [opened, reopened, synchronize] jobs: update_release_draft: permissions: @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Harden Runner - uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 with: egress-policy: audit diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index f22e23d73..1e28bae9e 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -39,12 +39,12 @@ jobs: git checkout -b pre-release/${VERSION} # Split version number into major, minor, and micro - MAYOR=$(echo $VERSION | cut -d. -f1) + MAJOR=$(echo $VERSION | cut -d. -f1) MINOR=$(echo $VERSION | cut -d. -f2) MICRO=$(echo $VERSION | cut -d. -f3) # Write on to the version.py file - sed -i "s/major: int = \([0-9]\+\)/major: int = $MAYOR/g" heat/core/version.py + sed -i "s/major: int = \([0-9]\+\)/major: int = $MAJOR/g" heat/core/version.py sed -i "s/minor: int = \([0-9]\+\)/minor: int = $MINOR/g" heat/core/version.py sed -i "s/micro: int = \([0-9]\+\)/micro: int = $MICRO/g" heat/core/version.py sed -i "s/extension: str = .*/extension: str = None/g" heat/core/version.py