Skip to content

Commit

Permalink
added release action to attach zip on releases
Browse files Browse the repository at this point in the history
  • Loading branch information
hansmorb committed Sep 25, 2023
1 parent 83f87b3 commit a9e28c2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion bin/build-zip.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down

0 comments on commit a9e28c2

Please sign in to comment.