This repository was archived by the owner on Sep 15, 2025. It is now read-only.
env: 직접 실행시 qa 문구 추가되면 dev 서버 바라보도록 #patch #34
This file contains hidden or 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
| 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 | |
| elif [[ "$last_commit_message" == *"#patch"* ]]; then | |
| echo "version_type=patch" >> $GITHUB_ENV | |
| else | |
| echo "No specific version bump keyword found. Skip it" | |
| 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 }} |