Skip to content

Commit 8660a19

Browse files
committed
fix: 버전 추출 스크립트 변경
1 parent b1b54fd commit 8660a19

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/deploy-prod.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,23 @@ jobs:
127127
echo "SEMANTIC_VERSION=${{ github.event.inputs.rollback_version }}" >> $GITHUB_ENV
128128
else
129129
echo "Running semantic-release to determine next version..."
130-
OUTPUT=$(./node_modules/.bin/semantic-release --dry-run --no-ci)
130+
OUTPUT=$(./node_modules/.bin/semantic-release --dry-run --no-ci || true)
131131
echo "$OUTPUT"
132-
VERSION=$(echo "$OUTPUT" | grep -oP 'The next release version is \K[0-9.a-z-]+')
132+
133+
VERSION=$(echo "$OUTPUT" | grep -oP 'Published release \K[0-9.a-z-]+|The next release version is \K[0-9.a-z-]+' | head -n 1)
134+
133135
if [ -z "$VERSION" ]; then
134136
echo "릴리즈할 새로운 버전이 없습니다. 배포를 건너뜁니다."
135-
exit 0
137+
echo "SEMANTIC_VERSION=" >> $GITHUB_ENV
138+
else
139+
echo "Determined version: $VERSION"
140+
echo "SEMANTIC_VERSION=$VERSION" >> $GITHUB_ENV
136141
fi
137-
echo "SEMANTIC_VERSION=$VERSION" >> $GITHUB_ENV
138142
fi
139143
env:
140144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141145

146+
142147
- name: Set up JDK 21
143148
uses: actions/setup-java@v4
144149
with:

0 commit comments

Comments
 (0)