Commit JS AST, update check-generated-file checkout action (#6262)

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
Lorenzo Lewis 2023-02-22 13:10:54 +00:00 committed by GitHub
parent 5fdf8dcb8e
commit cfcc7f3c20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 11 deletions

View File

@ -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'
@ -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'
@ -30,33 +32,34 @@ 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:
@ -64,7 +67,7 @@ jobs:
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

View File

@ -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

View File

@ -64,4 +64,5 @@ package-lock.json
.vscode/settings.json
# Documentation output
docs
docs/*
!docs/js-api.json

File diff suppressed because one or more lines are too long

View File

@ -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\"",