From 6274d24d662321fced61d480515ee46f9ff9fac0 Mon Sep 17 00:00:00 2001 From: Nikita Kiselev Date: Thu, 10 Jul 2025 18:34:43 +0300 Subject: [PATCH] build: cicd fixes --- .github/workflows/main.yaml | 12 ++++++++---- scripts/ci/build.sh | 5 ++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 30ca42b..24d895f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -2,19 +2,24 @@ name: Telegram Mini App Shop Builder on: push: - branches: - - master + tags: ['v*'] permissions: contents: write jobs: module-build: - if: github.ref == 'refs/heads/master' name: Build module. runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Setup PHP 7.4 + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + tools: composer + - name: Build module run: | bash scripts/ci/build.sh "${GITHUB_WORKSPACE}" @@ -27,7 +32,6 @@ jobs: retention-days: 1 release: - if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest needs: [module-build] steps: diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 11c2ed5..0d5248f 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -9,9 +9,12 @@ echo "Current dir: ${CURRENT_DIR}" composer --version node -v npm -v +php -v SRC_PATH="$1" -BUILD_PATH="${CURRENT_DIR}/build" +BUILD_PATH="${GITHUB_WORKSPACE}/build" + +mkdir -p "$BUILD_PATH" echo "🔨 Starting build process..." echo "ℹ️ Source path: ${SRC_PATH}"