You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/07/14 09:06:41 UTC

[camel-k] branch main updated: fix(ci): revert release action

This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new f7bde6ce8 fix(ci): revert release action
f7bde6ce8 is described below

commit f7bde6ce8a32f5f6a36eafc1494ade91baaa4731
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Fri Jul 14 11:05:57 2023 +0200

    fix(ci): revert release action
    
    The GITHUB_TOKEN has not permissions to update the worklfow files
---
 .github/workflows/manual-release-branch.yml | 45 -----------------------------
 release.adoc                                | 10 +++++--
 script/release-branch.sh                    | 12 ++++----
 3 files changed, 13 insertions(+), 54 deletions(-)

diff --git a/.github/workflows/manual-release-branch.yml b/.github/workflows/manual-release-branch.yml
deleted file mode 100644
index b6ef800a8..000000000
--- a/.github/workflows/manual-release-branch.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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-branch
-
-on:
-  workflow_dispatch:
-    inputs:
-
-permissions: write-all
-
-jobs:
-  release-branch:
-    runs-on: ubuntu-latest
-    steps:
-    - name: Checkout code
-      uses: actions/checkout@v3
-      with:
-        persist-credentials: false
-        submodules: recursive
-    - name: Create branch
-      shell: bash
-      env:
-        CI_USER: "github-actions[bot]"
-        CI_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
-        CI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-      run: |
-        ./script/release-branch.sh
-
-
-
diff --git a/release.adoc b/release.adoc
index da04d9221..4429c7eca 100644
--- a/release.adoc
+++ b/release.adoc
@@ -22,9 +22,15 @@ As the process will do git operations, it is advisable that you clone the Camel
 
 === Create release branch from main branch
 
-Use the `release-branch` action in order to create a new branch from the `main` at a given moment. The action is in charge to scrape the actual version (it will remove any snapshot suffix) and to create the release branch accordingly. It also takes care to setup the required nightly actions in the new branch created.
+We have a script that simplify this process. As we do not only want to create and push a new branch, we also need to provide the CI tasks required for all the supported releases.
 
-Once the action is over, you can checkout the newly created release branch and continue with the release process.
+```
+git clone https://github.com/squakez/camel-k.git /tmp/camel-k
+cd /tmp/camel-k
+./script/release-branch.sh
+```
+
+NOTE: you can run the script with -d option to dry run and evaluate the changes before pushing them to the repo.
 
 [[releasing-camel-k-crds]]
 === Release Camel K CRD dependency
diff --git a/script/release-branch.sh b/script/release-branch.sh
index a998de082..8eb3208bd 100755
--- a/script/release-branch.sh
+++ b/script/release-branch.sh
@@ -47,13 +47,11 @@ main() {
   then
     echo "❗ dry-run mode on, won't push any change!"
   else
-    git config --local user.email "$CI_EMAIL"
-    git config --local user.name "$CI_USER"
-    git add -A && git commit -m "chore: starting release branch for $new_release_branch" || true
-
-    git push "https://$CI_USER:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:$new_release_branch
-    git push "https://$CI_USER:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:main
-
+    git add --all
+    git commit -m "chore: starting release branch for $new_release_branch" || true
+    git push --set-upstream origin $new_release_branch
+    # We must push on main as well, as it contains the changes for CI workflows
+    git push --set-upstream origin main
     echo "🎉 Changes pushed correctly!"
   fi
 }