@@ -9,62 +9,61 @@ on: push
9
9
jobs :
10
10
check-and-test :
11
11
runs-on : ubuntu-20.04
12
+ steps :
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v4
12
15
13
- steps :
14
- - name : Checkout repository
15
- uses : actions/checkout@v4
16
+ - name : Use Node.js from .nvmrc
17
+ uses : actions/setup-node@v4
18
+ with :
19
+ node-version-file : " .nvmrc"
16
20
17
- - name : Use Node.js from .nvmrc
18
- uses : actions/setup-node@v4
19
- with :
20
- node-version-file : " .nvmrc "
21
+ - name : Get npm cache directory
22
+ id : npm-cache-dir
23
+ shell : bash
24
+ run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
21
25
22
- - name : Get npm cache directory
23
- id : npm-cache-dir
24
- shell : bash
25
- run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
26
-
27
- - uses : actions/cache@v4
28
- id : npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
29
- with :
30
- path : ${{ steps.npm-cache-dir.outputs.dir }}
31
- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
32
- restore-keys : |
33
- ${{ runner.os }}-node-
34
- - name : Set output
35
- id : vars
36
- run : echo name=tag::${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
37
- - name : Check output
38
- env :
39
- RELEASE_VERSION : ${{ steps.vars.outputs.tag }}
40
- run : |
41
- echo $RELEASE_VERSION
42
- echo ${{ steps.vars.outputs.tag }}
43
- - run : npm update
44
- - run : npm install
45
- - uses : actions/upload-artifact@v4
46
- with :
47
- name : build
48
- path : |
49
- aframe/build/*.js
50
- three.js/build/*.js
51
- - run : |
52
- npm run build
53
- - name : Commit changes
54
- if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
55
- uses : EndBug/add-and-commit@v9
56
- with :
57
- default_author : github_actions
58
- message : new build files from action
59
- add : ' ["aframe/build", "three.js/build"]'
60
- - name : Release
61
- uses : softprops/action-gh-release@v2
62
- if : startsWith(github.ref, 'refs/tags/')
63
- with :
64
- files : |
65
- aframe/build/aframe-ar.js
66
- aframe/build/aframe-ar-nft.js
67
- aframe/build/aframe-ar-location-only.js
68
- three.js/build/ar.js
69
- three.js/build/ar-threex.js
70
- three.js/build/ar-threex-location-only.js
26
+ - uses : actions/cache@v4
27
+ id : npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
28
+ with :
29
+ path : ${{ steps.npm-cache-dir.outputs.dir }}
30
+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31
+ restore-keys : |
32
+ ${{ runner.os }}-node-
33
+ - name : Set output
34
+ id : vars
35
+ run : echo name=tag::${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
36
+ - name : Check output
37
+ env :
38
+ RELEASE_VERSION : ${{ steps.vars.outputs.tag }}
39
+ run : |
40
+ echo $RELEASE_VERSION
41
+ echo ${{ steps.vars.outputs.tag }}
42
+ - run : npm update
43
+ - run : npm install
44
+ - uses : actions/upload-artifact@v4
45
+ with :
46
+ name : build
47
+ path : |
48
+ aframe/build/*.js
49
+ three.js/build/*.js
50
+ - run : |
51
+ npm run build
52
+ - name : Commit changes
53
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
54
+ uses : EndBug/add-and-commit@v9
55
+ with :
56
+ default_author : github_actions
57
+ message : new build files from action
58
+ add : ' ["aframe/build", "three.js/build"]'
59
+ - name : Release
60
+ uses : softprops/action-gh-release@v2
61
+ if : startsWith(github.ref, 'refs/tags/')
62
+ with :
63
+ files : |
64
+ aframe/build/aframe-ar.js
65
+ aframe/build/aframe-ar-nft.js
66
+ aframe/build/aframe-ar-location-only.js
67
+ three.js/build/ar.js
68
+ three.js/build/ar-threex.js
69
+ three.js/build/ar-threex-location-only.js
0 commit comments