-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (49 loc) · 2.02 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, closed]
name: Build + compile
jobs:
echo:
name: Echo github context
runs-on: ubuntu-latest
steps:
- run: echo "${{ !(github.actor == 'Explosion-Scratch' && github.event.pull_request) }}"
- run: echo "Github actor is Explosion-Scratch? ${{ github.actor == 'Explosion-Scratch' }}"
- run: echo "Is PR? ${{ !!github.event.pull_request }}"
- run: echo "PR author – ${{github.event.pull_request.user.login}}"
release:
name: Build + compile
runs-on: ubuntu-latest
steps:
- name: Build and compile
uses: technote-space/create-pr-action@v2
with:
EXECUTE_COMMANDS: |
sudo npm install;
sudo npm i -g eslint
sudo npm i -g prettier
sudo npm i -g terser
sudo npm i -g jsdoc
sudo npm i -g rollup
sudo npm i -g figlet-cli
sudo npm i -g jsdoc-to-markdown
sudo npm i -D typescript
rm -f bijou_node.js
rm -f bijou.js
cat ./js/_copyright.js ./js/array.js ./js/color.js ./js/date.js ./js/element.js ./js/event.js ./js/function.js ./js/object.js ./js/math.js ./js/string.js ./js/utility.js ./js/_end.js > bijou.js
rm -rf docs/docs
rm -f bijou-min.js
jsdoc -c jsdoc.json
sudo eslint --fix ./ || eslint --fix ./ || ls
prettier --write -- .
rollup bijou.js --file bijou_node.js --format cjs
terser --comments false --ecma 6 --ie8 --module --compress --drop-console --mangle -o docs/bijou.js -- bijou.js
terser --comments false --ecma 6 --ie8 --module --compress --drop-console --mangle -o bijou-min.js -- bijou.js
jsdoc2md bijou.js > documentation.md
tsc
COMMIT_MESSAGE: "Automated build"
COMMIT_NAME: 'Explosion-Scratch'
COMMIT_EMAIL: 'explosionscratch@gmail.com'
PR_BRANCH_NAME: 'build-pr-${PR_NUMBER}'
PR_TITLE: 'Build and compile ${PR_NUMBER_REF}'