From a9e28c265317dbf6b741b4d127cc828d72fdc16f Mon Sep 17 00:00:00 2001 From: Hans Morbach <6433480+hansmorb@users.noreply.github.com> Date: Mon, 25 Sep 2023 19:21:11 -0400 Subject: [PATCH] added release action to attach zip on releases --- .github/workflows/build-release.yml | 37 +++++++++++++++++++++++++++++ bin/build-zip.sh | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-release.yml mode change 100644 => 100755 bin/build-zip.sh diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 000000000..e01249974 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,37 @@ +name: Create release +on: + release: + types: + - created + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + + - uses: actions/checkout@v3 + + - uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.0.6' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: gem install compass + + - uses: actions/setup-node@v2 + with: + node-version: 12 + + - name: Run build script + run: bin/build-zip.sh + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: commonsbooking.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/bin/build-zip.sh b/bin/build-zip.sh old mode 100644 new mode 100755 index 5b6a7ca04..b6daf848d --- a/bin/build-zip.sh +++ b/bin/build-zip.sh @@ -15,7 +15,7 @@ npm ci echo "Running JS Build..." grunt dist || exit "$?" echo "Cleaning up PHP dependencies..." -composer install --no-dev || exit "$?" +composer install --no-dev --ignore-platform-reqs || exit "$?" echo "Run makepot..." wp i18n make-pot . languages/commonsbooking.pot echo "Syncing files..."