Skip to content

Commit

Permalink
Commit JS AST, update check-generated-file checkout action (tauri-a…
Browse files Browse the repository at this point in the history
…pps#6262)

Co-authored-by: Lucas Nogueira <[email protected]>
  • Loading branch information
lorenzolewis and lucasfernog authored Feb 22, 2023
1 parent 5fdf8dc commit cfcc7f3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/check-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
paths:
- '.github/workflows/check-generated-files.yml'
- 'tooling/api/src/**'
- 'tooling/api/docs/js-api.json'
- 'core/tauri/scripts/bundle.global.js'
- 'core/tauri-utils/src/config.rs'
- 'tooling/cli/schema.json'
Expand All @@ -17,6 +18,7 @@ on:
paths:
- '.github/workflows/check-generated-files.yml'
- 'tooling/api/src/**'
- 'tooling/api/docs/js-api.json'
- 'core/tauri/scripts/bundle.global.js'
- 'core/tauri-utils/src/config.rs'
- 'tooling/cli/schema.json'
Expand All @@ -30,41 +32,42 @@ jobs:
changes:
runs-on: ubuntu-latest
outputs:
bundle: ${{ steps.filter.outputs.bundle }}
api: ${{ steps.filter.outputs.api }}
schema: ${{ steps.filter.outputs.schema }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
bundle:
api:
- 'tooling/api/src/**'
- 'tooling/api/docs/js-api.json'
- 'core/tauri/scripts/bundle.global.js'
schema:
- 'core/tauri-utils/src/config.rs'
- 'tooling/cli/schema.json'
- 'core/config-schema/schema.json'
check-bundle:
check-api:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.bundle == 'true'
if: needs.changes.outputs.api == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: generate bundle
- name: build api
working-directory: tooling/api
run: yarn && yarn build
- name: check bundle
- name: check api
run: ./.scripts/ci/has-diff.sh

check-schema:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.schema == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: install stable
uses: actions-rs/toolchain@v1
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ dist
/tooling/cli/templates
/tooling/cli/node
/tooling/cli/schema.json
/tooling/api/docs/js-api.json
/core/config-schema/schema.json
3 changes: 2 additions & 1 deletion tooling/api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ package-lock.json
.vscode/settings.json

# Documentation output
docs
docs/*
!docs/js-api.json
1 change: 1 addition & 0 deletions tooling/api/docs/js-api.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tooling/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"./package.json": "./package.json"
},
"scripts": {
"build": "yarn tsup && node ./scripts/after-build.cjs",
"build": "yarn tsup && node ./scripts/after-build.cjs && yarn generate-docs",
"npm-pack": "yarn build && cd ./dist && npm pack",
"npm-publish": "yarn build && cd ./dist && yarn publish --access public --loglevel silly",
"lint": "eslint --ext ts \"./src/**/*.ts\"",
Expand Down

0 comments on commit cfcc7f3

Please sign in to comment.