Skip to content

Commit

Permalink
chore: splits up version, tag, commit and push
Browse files Browse the repository at this point in the history
  • Loading branch information
VannaDii committed Dec 10, 2023
1 parent eb84df2 commit 5e6d2b0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
echo "GIT_IS_DIRTY=false" >> $GITHUB_ENV
fi
- name: 🏷️ Tag
- name: 🏷️ Version
if: env.GIT_IS_DIRTY == 'true'
env:
GH_TOKEN: ${{ github.token }}
Expand All @@ -52,17 +52,22 @@ jobs:
IFS=. read -r v1 v2 v3 <<< "${LATEST_TAG}" # split into (integer) components
((v3++)) # do the math
LATEST_TAG="${v1}.${v2}.${v3}"
echo "Updated tag to $LATEST_TAG"
echo "Updating dist js"
git commit -a -m "chore: updates dist js" --author="github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
echo "Pushing tag $LATEST_TAG"
echo "LATEST_TAG=${LATEST_TAG}" >> $GITHUB_ENV
- name: 🏷️ Tag
if: env.GIT_IS_DIRTY == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
git tag -f "$LATEST_TAG" -m "Version $LATEST_TAG"
echo "Pushing tag latest"
git tag -f latest -m "The latest version"
- name: 📌 Commit & Push
if: env.GIT_IS_DIRTY == 'true'
uses: GuillaumeFalourd/[email protected]
with:
name: github-actions[bot]
email: github-actions[bot]@users.noreply.github.com
commit_message: "chore: updates dist js"
tags: true
force: true

0 comments on commit 5e6d2b0

Please sign in to comment.