Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release] [minor] fix release #35

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ on:
workflows: [CI]
types: [completed]
branches: [main]

jobs:
check_commit:
name: Check Commit
@@ -28,17 +28,14 @@ jobs:
id: check_msg
run: |
LATEST_COMMIT_MSG=$(git log -1 --pretty=%B | cat)

if [[ ${LATEST_COMMIT_MSG} == *"[release]"* ]]; then
echo "release message found - continuing with the release"
IS_RELEASE="true"
else
echo "release message found - skipping..."
echo "no release message found - skipping..."
IS_RELEASE="false"
fi

echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
echo "LATEST_COMMIT_MSG=\"${LATEST_COMMIT_MSG}\"" >> $GITHUB_OUTPUT

release:
name: Release
@@ -47,7 +44,6 @@ jobs:
if: ${{ needs.check_commit.outputs.IS_RELEASE == 'true' }}
env:
IS_RELEASE: ${{ needs.check_commit.outputs.IS_RELEASE }}
LATEST_COMMIT_MSG: ${{ needs.check_commit.outputs.LATEST_COMMIT_MSG }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
@@ -66,6 +62,7 @@ jobs:
- name: Bump version
run: |
set -e
LATEST_COMMIT_MSG=$(git log -1 --pretty=%B | cat)

echo "Extract the latest tag version"
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))