-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: main 브랜치 머지할때 자동 tagging (#51) #minor
* pc 온보딩 문구 임의로 변경 * main 브랜치에 머지되면 자동 tag 생성되도록 * 직접 태그 선택해서 배포할 수도 있도록 변경
- Loading branch information
Showing
3 changed files
with
47 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Bump version | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
update-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Determine version type | ||
id: get_version_type | ||
run: | | ||
last_commit_message=$(git log -1 --pretty=%B) | ||
echo "Last commit message: $last_commit_message" | ||
if [[ "$last_commit_message" == *"#major"* ]]; then | ||
echo "version_type=major" >> $GITHUB_ENV | ||
elif [[ "$last_commit_message" == *"#minor"* ]]; then | ||
echo "version_type=minor" >> $GITHUB_ENV | ||
else | ||
echo "No specific version bump keyword found. Defaulting to patch." | ||
echo "version_type=patch" >> $GITHUB_ENV | ||
fi | ||
- name: Bump version | ||
run: | | ||
git config --local user.name "github-actions[bot]" | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
npm version ${{ env.version_type }} | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
tags: true | ||
branch: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters