Feat/#92. Github Actions μλν μ½λ μΆκ° #1
Workflow file for this run
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
# Tag μμ± λ° Release μμ± | |
name: Versioning - Tagging and Release | |
on: | |
pull_request: | |
branches: | |
- develop | |
types: | |
- closed | |
jobs: | |
check-branch: | |
runs-on: ubuntu-latest | |
outputs: | |
current_branch: ${{ steps.branch-name.outputs.current_branch }} | |
steps: | |
- name: Get branch names | |
id: branch-name | |
uses: tj-actions/branch-names@v8 | |
# Release λλ Hotfix λΈλμΉκ° merge λ λ μ€ν | |
tagging-and-release: | |
needs: check-branch | |
runs-on: 'ubuntu-latest' | |
if: github.event.pull_request.merged == true && (startsWith(${{ needs.check-branch.outputs.current_branch }}, 'release/') || startsWith(${{ needs.check-branch.outputs.current_branch }}, 'hotfix/')) | |
steps: | |
- name: Get tag | |
id: get-tag | |
run: | | |
branch=${{ needs.check-branch.outputs.current_branch }} | |
new_tag="${branch#release/}" | |
new_tag="${new_tag#hotfix/}" | |
echo "NEW_TAG=$new_tag" >> $GITHUB_OUTPUT | |
- name: Check tag | |
run: | | |
echo ${{ steps.get-tag.outputs.NEW_TAG }} | |
- name: Create Release & Tag | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_TOKEN }} | |
with: | |
tag_name: ${{ steps.get-tag.outputs.NEW_TAG }} | |
release_name: ${{ steps.get-tag.outputs.NEW_TAG }} | |
body: | | |
${{ github.event.pull_request.body }} |