From ab3298070c4c73d421533fa018c396c953a14900 Mon Sep 17 00:00:00 2001 From: jerome villiseck Date: Tue, 29 Oct 2024 14:45:40 +0100 Subject: [PATCH] Update create-release.yml --- .github/workflows/create-release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index b838e22..bb4df60 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -25,11 +25,11 @@ jobs: token: ${{ secrets.TOKEN_GITHUB_FOR_GITHUB_ACTION }} - - name: 'Verify release is created only on "main" or "master" git branch' + - name: 'Verify release is created only on "main-old" or "master" git branch' run: | CURRENT_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) echo $CURRENT_GIT_BRANCH - [[ "$CURRENT_GIT_BRANCH" == "main" || "$CURRENT_GIT_BRANCH" == "master" ]] && exit 0 || exit 1 + [[ "$CURRENT_GIT_BRANCH" == "main-old" || "$CURRENT_GIT_BRANCH" == "master" ]] && exit 0 || exit 1 - name: 'Verify version is semver formatted (X.X.X)' env: NEW_TAG: ${{ github.event.inputs.releaseVersion }} @@ -50,7 +50,7 @@ jobs: # préparation de la release qui va : # - modifier le numéro de version dans le package.json du projet (et éventuellement dans le README.md ou d'autres fichiers, cf le sed) # - créer un tag git du numéro de version en question - # - pousser le tout sur le dépôt github et faire la fusion avec la branche develop + # - pousser le tout sur le dépôt github et faire la fusion avec la branche develop-old git config --global user.email "github-action@noreply" git config --global user.name "Github Action" npm config set tag-version-prefix '' @@ -63,10 +63,10 @@ jobs: git push origin $NEW_TAG git commit --amend -m "Version $NEW_TAG [skip ci]" git push - # merge la préparation de la nouvelle version sur develop + # merge la préparation de la nouvelle version sur develop-old # (version X.X.X-SNAPSHOT) - git switch develop - git merge main -m "Merge main to develop [skip ci]" + git switch develop-old + git merge main-old -m "Merge main-old to develop-old [skip ci]" npm version $SNAPSHOT sed -i "s#Version: [0-9]+\.[0-9]+\.[0-9]+#Version: $SNAPSHOT#g" README.md git add .