Skip to content

Commit

Permalink
fix: 브랜치 이름으로 버전 추출하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
murjune committed Oct 22, 2024
1 parent 3783a1d commit a64f7cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/Android_Release_CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,16 @@ jobs:
path: android/app/build/outputs/apk/release/
if-no-files-found: error

- name: Extract Version Name
- name: Extract Version Name from Branch
shell: bash
env:
title: ${{ inputs.title }}
run: |
version=$(echo '${{ github.event.pull_request.title }}' | grep -oP '\d+\.\d+\.\d+')
branch_name=$(echo "${{ github.ref_name }}" | sed 's:.*/::')
version=$(echo "$branch_name" | grep -oP '\d+\.\d+\.\d+')
if [ -z "$version" ]; then
echo "No version found in the title."
echo "version=none" >> $GITHUB_ENV
echo "No version found in branch name."
echo "version=none" >> $GITHUB_ENV
else
echo "version=v$version" >> $GITHUB_ENV
echo "version=v$version" >> $GITHUB_ENV
fi
- name: Create Github Release
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/Android_Release_CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: Android PR Builder
on:
push:
branches: [ "an/release*" ]

jobs:
build:
name: CD Release Builder
name: CI Release Builder
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit a64f7cc

Please sign in to comment.