diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100755 index f808751..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: JavaScript - -on: - push: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - uses: flarum/action-build@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml new file mode 100755 index 0000000..5c1f493 --- /dev/null +++ b/.github/workflows/frontend.yml @@ -0,0 +1,22 @@ +name: <%= params.extensionName %> JS + +on: [workflow_dispatch, push, pull_request] + +# The reusable workflow definitions will be moved to the `flarum/framework` repo soon. +# This will break your current script. +# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure. + +jobs: + run: + uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@as/support-npm-yarn + with: + enable_bundlewatch: true + enable_prettier: true + enable_typescript: true + + frontend_directory: js + backend_directory: src + package_manager: yarn + main_git_branch: main + secrets: + bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100755 index 8264b3d..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Lint - -on: - push: - paths: - - 'js/src/**' - pull_request: - paths: - - 'js/src/**' - -jobs: - prettier: - runs-on: ubuntu-latest - - name: JS / Prettier - - steps: - - uses: actions/checkout@master - - - name: Setup Node.js - uses: actions/setup-node@v1 - with: - node-version: "12" - - - name: Install JS dependencies - run: npm ci - working-directory: ./js - - - name: Check JS code for formatting - run: node_modules/.bin/prettier --check src - working-directory: ./js \ No newline at end of file