Skip to content

Commit

Permalink
Merge pull request #17 from lrdiv/actions-fix
Browse files Browse the repository at this point in the history
CI CD updates
  • Loading branch information
lrdiv authored Jan 15, 2025
2 parents a37ce59 + 9288c93 commit 1800158
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 15 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 1 addition & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
actions: read
contents: read

jobs:
main:
pr:
runs-on: ubuntu-latest
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
Expand All @@ -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
Expand All @@ -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

0 comments on commit 1800158

Please sign in to comment.