Skip to content

Commit

Permalink
ci: update-scripts-and-ci
Browse files Browse the repository at this point in the history
refactor env variables in ci into one central location instead of
repeating the jobs in multiple places.

remove some stuff from nx.json cacheable operations
  • Loading branch information
ryanbas21 committed May 18, 2023
1 parent dbebd11 commit 9b8d11e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
workflow_dispatch:
env:
NX_CLOUD_DISTRIBUTED_EXECUTION: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
jobs:
merge:
runs-on: ubuntu-latest # we run on ubuntu because some actions in this job do not work on mac
Expand All @@ -23,8 +28,6 @@ jobs:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
registry-url: https://registry.npmjs.org
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm ci
- name: Derive appropriate SHAs for base and head for `nx affected` commands
id: sha
Expand All @@ -35,17 +38,11 @@ jobs:
- name: semantic-release
if: github.ref == 'refs/heads/master'
run: npm run nx affected --target=version
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
- name: semantic-release beta
if: github.ref == 'refs/heads/develop'
run: npm run nx affected -- --target=version --configuration=beta
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
8 changes: 2 additions & 6 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,9 @@
"config",
"tsc",
"typedoc",
"version",
"deploy",
"npm",
"github",
"updatePackageJson"
"version"
],
"useDaemonProcess": false,
"useDaemonProcess": true,
"accessToken": "NzU3MWE3MjgtOWRiZi00ZDczLWI4YWYtMDI5NThmNTRkNDc1fHJlYWQtd3JpdGU="
}
}
Expand Down
1 change: 1 addition & 0 deletions scripts/update-package-json-sdk.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
const path = require('path');
const { readFileSync, writeFileSync } = require('fs');

Expand Down

0 comments on commit 9b8d11e

Please sign in to comment.