Skip to content

Querystring parsing fixes #10

Querystring parsing fixes

Querystring parsing fixes #10

Workflow file for this run

name: Build and publish application
on:
push:
branches:
- main
tags:
- 'v*.*.*'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
jobs:
build:
runs-on: ubuntu-latest
steps:
# https://stackoverflow.com/a/70338674/179520
- name: Set to live bucket if tagged
if: startsWith(github.event.ref, 'refs/tags/v')
run: echo "AWS_S3_BUCKET=${{ secrets.AWS_S3_LIVE_BUCKET }}" >> $GITHUB_ENV
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install needed Java version
uses: actions/setup-java@v1
with:
java-version: '8'
- name: Cache Node.js modules 💾
uses: actions/cache@v2
with:
path: |
node_modules
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Cache ext 💾
uses: actions/cache@v2
with:
path: |
resources/external
ext-7.0.0
ext-7.0.0-gpl.zip
sencha-cmd-download
sencha-cmd
key: ${{ runner.OS }}-node-${{ hashFiles('resources/external/ext-all.js') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Download ExtJS, install sencha cmd
run: |
if (test ! -f ext-7.0.0-gpl.zip); then wget -q http://cdn.sencha.com/ext/gpl/ext-7.0.0-gpl.zip -O ext-7.0.0-gpl.zip; fi
if (test ! -d ext-7.0.0); then unzip -qo ext-7.0.0-gpl.zip; fi
mkdir -p sencha-cmd-download
if (test ! -f sencha-cmd-download/SenchaCmd-7.3.0.19-linux-amd64.sh.zip); then wget -q http://cdn.sencha.com/cmd/7.3.0.19/no-jre/SenchaCmd-7.3.0.19-linux-amd64.sh.zip -O sencha-cmd-download/SenchaCmd-7.3.0.19-linux-amd64.sh.zip; fi
if (test ! -f sencha-cmd-download/SenchaCmd-7.3.0.19-linux-amd64.sh); then unzip -q -d sencha-cmd-download sencha-cmd-download/SenchaCmd-7.3.0.19-linux-amd64.sh.zip; fi
mkdir -p sencha-cmd
if (test ! -f sencha-cmd/sencha); then ./sencha-cmd-download/SenchaCmd-7.3.0.19-linux-amd64.sh -q -dir "$PWD/sencha-cmd"; fi
mv ext-7.0.0 ext
- name: Install dependencies ⏬
run: npm install
#- name: Testing 🔎
# run: npm test
#- name: Generate coverage 🧪
# run: npm run test:coverage
#- name: Publish to coveralls ⭐
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build sencha app
run: |
SENCHACMD="$PWD/sencha-cmd/sencha"
$SENCHACMD app build
# https://github.com/marketplace/actions/s3-sync
# Enable Static Hosting (bottom of Properties tab)
- name: Sync files to S3 bucket
uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete # --acl public-read is on by default for the bucket
env:
# https://us-east-1.console.aws.amazon.com/iamv2/home?region=us-east-1#/users
AWS_S3_BUCKET: ${{ env.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1'
SOURCE_DIR: './build/production/OwsInspector'