diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f4ab07ff..ce8dcc0e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -5,9 +5,9 @@ name: Build on: push: - branches: [ "main" ] + branches: [ "workspace" ] pull_request: - branches: [ "main" ] + branches: [ "workspace" ] jobs: prepare: @@ -28,13 +28,23 @@ jobs: const fs = require('fs') const path = require('path') const process = require('process') + const paths = [] - const pathName = path.join(process.cwd(), 'plugins') - const files = fs.readdirSync(pathName) - const directories = files.filter((file) => fs.statSync(path.join(pathName, file)).isDirectory()).map((dir) => `plugins/${dir}`) + paths.push(...getProjects('plugins')) + paths.push(...getProjects('packages')) - directories.push('core') - core.setOutput('paths', directories) + paths.push('core') + console.log(paths) + + core.setOutput('paths', paths) + + function getProjects(dirname) { + const pathName = path.join(process.cwd(), dirname) + const files = fs.readdirSync(pathName) + const directories = files.filter((file) => fs.statSync(path.join(pathName, file)).isDirectory()).map((dir) => `${dirname}/${dir}`) + + return directories + } build: name: Build ${{ matrix.path }} runs-on: ubuntu-latest @@ -46,13 +56,10 @@ jobs: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - uses: oven-sh/setup-bun@v2 with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - check-latest: true + bun-version: latest - run: | cd ${{ matrix.path }} && - npm ci && - npm run build --if-present \ No newline at end of file + bun i && + bun build ./src/app.ts --target=bun --minify --outfile=build.js \ No newline at end of file