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..."