Skip to content

Commit 0c8a0d1

Browse files
committed
Update build_releases.yml
1 parent 100d693 commit 0c8a0d1

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/build_releases.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,20 @@ jobs:
4545
- name: Create version branch if not exists
4646
if: github.ref_name == 'main'
4747
run: |
48-
BOT_VERSION=$(node -p "require('./bot/package.json').version")
49-
BRANCH_NAME="v${BOT_VERSION}"
48+
if [ -f bot/package.json ]; then
49+
BOT_VERSION=$(node -p "require('./bot/package.json').version")
50+
BRANCH_NAME="v${BOT_VERSION}"
5051
51-
# sprawdź czy branch istnieje w remote
52-
if git ls-remote --exit-code origin $BRANCH_NAME; then
53-
echo "Branch $BRANCH_NAME already exists"
54-
else
55-
echo "Creating branch $BRANCH_NAME"
56-
git checkout -b $BRANCH_NAME
57-
git push origin $BRANCH_NAME
58-
git checkout main
52+
# sprawdź czy branch istnieje w remote
53+
if git ls-remote --exit-code origin $BRANCH_NAME; then
54+
echo "Branch $BRANCH_NAME already exists"
55+
else
56+
echo "Creating branch $BRANCH_NAME"
57+
git checkout -b $BRANCH_NAME
58+
git push origin $BRANCH_NAME
59+
git checkout main
60+
fi
61+
fi
5962
6063
# 5️⃣ Tworzenie ZIP-ów
6164
- name: Create ZIP files

0 commit comments

Comments
 (0)