Skip to content

Commit 3574a9d

Browse files
fix: skip all caching in publish CI
TICKET: WP-6096
1 parent 3e3b453 commit 3574a9d

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Publish @bitgo-beta
22
on:
33
workflow_dispatch:
4-
# push:
5-
# branches:
6-
# - master
74

85
permissions:
96
contents: write
@@ -14,6 +11,10 @@ concurrency:
1411
env:
1512
NX_NO_CLOUD: true
1613
NX_SKIP_NX_CACHE: true
14+
NX_DISABLE_NX_CACHE: true
15+
NX_SKIP_REMOTE_CACHE: true
16+
NX_DISABLE_REMOTE_CACHE: true
17+
NX_CACHE: false
1718

1819
jobs:
1920
publish:
@@ -29,9 +30,6 @@ jobs:
2930
with:
3031
node-version-file: .nvmrc
3132

32-
- name: Install BitGoJS
33-
run: yarn install --with-frozen-lockfile
34-
3533
- name: Set Environment Variable for Alpha
3634
if: github.ref != 'refs/heads/master' # only publish changes if on feature branches
3735
run: |
@@ -52,16 +50,34 @@ jobs:
5250
echo "@bitgo-beta:registry=https://registry.npmjs.org" >> .npmrc
5351
echo "//registry.npmjs.org/:_authToken=${{ secrets.BETA_TOKEN }}" >> .npmrc
5452
echo "//registry.npmjs.org/:always-auth=true" >> .npmrc
53+
54+
- name: Install
55+
env:
56+
NOYARNPOSTINSTALL: true
57+
run: yarn install --with-frozen-lockfile --ignore-scripts
58+
59+
- name: Clean all caches
60+
run: |
61+
# Clean NX cache
62+
npx nx reset
63+
# Clean TypeScript incremental build cache
64+
find . -name "tsconfig.tsbuildinfo" -delete
65+
# Clean dist directories to force full rebuild
66+
find ./modules -name "dist" -type d -exec rm -rf {} + 2>/dev/null || true
67+
# Clean node_modules/.cache
68+
find ./modules -path "*/node_modules/.cache" -type d -exec rm -rf {} + 2>/dev/null || true
69+
70+
- name: Rebuild packages
71+
env:
72+
NOYARNPOSTINSTALL: true
73+
run: yarn lerna run build --stream --no-cache
5574

5675
- name: Prepare Release
5776
run: |
5877
rm -rfd ./modules/web-demo
5978
rm -rfd ./modules/express
6079
npx tsx ./scripts/prepare-release.ts ${{ env.preid }}
61-
62-
- name: Rebuild packages
63-
run: yarn
64-
80+
6581
- name: Commit Local Changes
6682
run: git commit -am "Auto updated ${{ env.preid }} branch" --no-verify || echo "No changes to commit"
6783

0 commit comments

Comments
 (0)