|
| 1 | +on: |
| 2 | + push: # Runs whenever a commit is pushed to the repository... |
| 3 | +concurrency: |
| 4 | + group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' |
| 5 | + cancel-in-progress: true |
| 6 | + |
| 7 | +permissions: |
| 8 | + contents: write |
| 9 | +jobs: |
| 10 | + build-deploy: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + env: |
| 13 | + JVM_OPTS: -Xmx3200m |
| 14 | + JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + - uses: wagoid/commitlint-github-action@v5 |
| 18 | + - name: Setup Java |
| 19 | + uses: actions/setup-java@v2 |
| 20 | + with: |
| 21 | + distribution: 'temurin' |
| 22 | + java-version: 17 |
| 23 | + - name: Setup submodule |
| 24 | + run: git submodule update --init --recursive |
| 25 | + - uses: actions/setup-node@v2 |
| 26 | + with: |
| 27 | + cache: "npm" |
| 28 | + node-version-file: ".nvmrc" |
| 29 | + - name: Info |
| 30 | + run: | |
| 31 | + cat <<EOF |
| 32 | + Node version: $(node --version) |
| 33 | + NPM version: $(npm --version) |
| 34 | + GitHub ref: ${{ github.ref }} |
| 35 | + GitHub head ref: ${{ github.head_ref }} |
| 36 | + EOF |
| 37 | + - name: Setup |
| 38 | + run: | |
| 39 | + # sudo apt update |
| 40 | + # sudo apt install libgif-dev |
| 41 | + TRAVIS_BRANCH="${{github.ref_name}}" travis/setup-git.sh # Configure git user info |
| 42 | + travis/install-assets.sh |
| 43 | + npm set progress=false |
| 44 | + which gulp || npm install -g gulp-cli |
| 45 | + - name: Install NPM Dependencies |
| 46 | + run: | |
| 47 | + npm ci --legacy-peer-deps |
| 48 | + - run: gulp jshint |
| 49 | + - run: gulp minify |
| 50 | + - run: gulp test |
| 51 | + - run: gulp zip |
| 52 | + - name: Tag build |
| 53 | + if: (github.ref == 'refs/heads/master') || (github.ref == 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix') || startsWith(github.ref, 'refs/heads/release') |
| 54 | + run: | |
| 55 | + TRAVIS_TAG="${{github.ref_name}}" TRAVIS_COMMIT="${{github.sha}}" travis/deploy-prebuilt.sh |
| 56 | + |
0 commit comments