diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6db1808 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build + +on: + push: + branches: + - main + +permissions: + actions: read + contents: read + +jobs: + main: + runs-on: ubuntu-latest + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + + - run: npm ci --legacy-peer-deps + - uses: nrwl/nx-set-shas@v4 + + - run: npx nx run-many -t lint test build + - run: npm run sentry:sourcemaps diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9740b11..def91fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,6 @@ name: CI on: - push: - branches: - - main pull_request: permissions: @@ -11,7 +8,7 @@ permissions: contents: read jobs: - main: + pr: runs-on: ubuntu-latest env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} @@ -20,13 +17,6 @@ jobs: with: fetch-depth: 0 - # This enables task distribution via Nx Cloud - # Run this command as early as possible, before dependencies are installed - # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - # Uncomment this line to enable task distribution - # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - # Cache node_modules - uses: actions/setup-node@v4 with: node-version: 20 @@ -35,8 +25,4 @@ jobs: - run: npm ci --legacy-peer-deps - uses: nrwl/nx-set-shas@v4 - # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud - # - run: npx nx-cloud record -- echo Hello World - # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected - run: npx nx affected -t lint test build - - run: npm run sentry:sourcemaps