Skip to content

Commit

Permalink
タグの確認方法を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
s1204IT authored Jan 20, 2024
1 parent f3798b4 commit e4541a2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,17 @@ jobs:
- name: Set environments
run: |
{
echo "version=$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")"
echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")"
echo "commit=$(echo ${{ github.sha }} | cut -c-7)"
echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})"
} >> $GITHUB_ENV
- name: Check tag exists
uses: mukunku/[email protected]
id: check-tag
with:
tag: "${{ env.version }}"

- name: Release check
if: github.event.inputs.release == 'true'
run: |
Expand All @@ -60,7 +66,7 @@ jobs:
echo "KEY_PASSWORD: 署名のパスワード"
exit 1
fi
if git show-ref --tags --verify --quiet "refs/tags/${{ env.version }}"; then
if [[ "${{ steps.check-tag.outputs.exists }}" == "true" ]]; then
echo -e "\nERROR!\n\n既に同じタグが存在します。\n\n"
echo "build.gradle の versionName を変更してください"
exit 1
Expand Down

0 comments on commit e4541a2

Please sign in to comment.