Skip to content

Commit

Permalink
Update create-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jvk88511334 authored Oct 29, 2024
1 parent 6758382 commit ab32980
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 ''
Expand All @@ -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 .
Expand Down

0 comments on commit ab32980

Please sign in to comment.