File tree 5 files changed +81
-29
lines changed
5 files changed +81
-29
lines changed Original file line number Diff line number Diff line change 6
6
- synchronize
7
7
- ready_for_review
8
8
9
+ name : Label, Build & Lint PR
10
+
9
11
jobs :
10
- build :
12
+ autolabel :
13
+ uses : Navigraph/workflows/.github/workflows/autolabel.yml@main
14
+ secrets : inherit
15
+
16
+ filter :
17
+ name : Register changed paths
18
+ if : ${{ !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name , 'release') }}
19
+ runs-on : ubuntu-latest
20
+ outputs :
21
+ js-interface : ${{ steps.changes.outputs.js-interface }}
22
+ example : ${{ steps.changes.outputs.example }}
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ - uses : dorny/paths-filter@v2
26
+ id : changes
27
+ with :
28
+ filters : |
29
+ js-interface:
30
+ - 'src/js/**'
31
+
32
+ lint :
33
+ name : Lint 📝
34
+ runs-on : ubuntu-latest
35
+ needs : [filter]
36
+ if : ${{ needs.filter.outputs.js-interface == 'true' && !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name , 'release') }}
37
+ steps :
38
+ - uses : actions/checkout@v4
39
+
40
+ - uses : actions/setup-node@v4
41
+ with :
42
+ node-version : " 18"
43
+ cache : " npm"
44
+
45
+ - name : Install node modules
46
+ run : npm ci
47
+
48
+ - name : Run linting
49
+ run : npm run lint:js -- -- --max-warnings 0
50
+
51
+ build-test :
52
+ name : Build & test 🛠️
11
53
runs-on : ubuntu-latest
54
+ if : ${{ !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name , 'release') }}
12
55
steps :
13
56
- name : Checkout
14
57
uses : actions/checkout@v4
Original file line number Diff line number Diff line change 5
5
- " v*-alpha*"
6
6
- " v*-beta*"
7
7
8
+ name : Create pre-release
9
+ run-name : Create pre-release for `${{ github.ref_name }}`
10
+
8
11
jobs :
9
- build :
12
+ release-wasm :
10
13
runs-on : ubuntu-latest
11
14
steps :
12
- - name : Checkout
13
- uses : actions/checkout@v2
15
+ - uses : actions/checkout@v4
16
+
14
17
- name : Build WASM module
15
18
run : npm run build:wasm-workflow
19
+
16
20
- name : Pre-Release
17
21
uses : softprops/action-gh-release@v1
18
22
with :
19
23
files : ./out/msfs_navdata_interface.wasm
20
24
prerelease : true
25
+ generate_release_notes : true
26
+
27
+ # Enable in future to automate publishing of NPM package
28
+ # release-js:
29
+ # runs-on: ubuntu-latest
30
+ # steps:
31
+ # - uses: actions/checkout@v4
32
+
33
+ # - uses: actions/setup-node@v4
34
+ # with:
35
+ # node-version: "18"
36
+ # registry-url: 'https://registry.npmjs.org'
37
+ # cache: "npm"
38
+
39
+ # - name: Install node modules
40
+ # run: npm ci
41
+
42
+ # - name: Build JS Interface
43
+ # run: cd src/js && npm run build
44
+
45
+ # - name: Publish to NPM
46
+ # env:
47
+ # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
48
+ # run: cd src/js && npm publish --tag next
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
- " !v*-rc*"
6
6
- " !v*-alpha*"
7
7
- " !v*-beta*"
8
+
9
+ name : Create release
10
+ run-name : Create release for `${{ github.ref_name }}`
8
11
9
12
jobs :
10
13
build :
11
14
runs-on : ubuntu-latest
12
15
steps :
13
16
- name : Checkout
14
17
uses : actions/checkout@v2
18
+
15
19
- name : Build WASM module
16
20
run : npm run build:wasm-workflow
21
+
17
22
- name : Release
18
23
uses : softprops/action-gh-release@v1
19
24
with :
Original file line number Diff line number Diff line change 5
5
],
6
6
"scripts" : {
7
7
"format" : " prettier --write ." ,
8
- "lint" : " eslint --ext ts,tsx . " ,
8
+ "lint:js " : " eslint \" src/js/**/*.ts \" " ,
9
9
"build:wasm" : " .\\ scripts\\ build.bat" ,
10
10
"build:wasm-workflow" : " ./scripts/run_docker_cmd.sh ./scripts/build.sh" ,
11
11
"jest" : " jest --verbose" ,
You can’t perform that action at this time.
0 commit comments