Skip to content

Commit

Permalink
chore: add option to skip caching jdk on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
moldy530 committed Dec 3, 2024
1 parent da667f0 commit 5880cf0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ inputs:
description: 'Node.js version'
required: false
default: '22'
use-android-cache:
description: "Cache JDK, Gradle, etc for android build"
required: false
type: boolean
default: true

runs:
using: 'composite'
Expand Down Expand Up @@ -39,6 +44,7 @@ runs:

# Android setup
- name: Check turborepo cache for Android
if: inputs.use-android-cache == true
shell: bash
run: |
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --dry=json | sed '1,2d;$d')).tasks.find(t => t.task === 'build:android').cache.status")
Expand Down Expand Up @@ -67,6 +73,6 @@ runs:
path: |
~/.gradle/wrapper
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('example/android/gradle/wrapper/gradle-wrapper.properties') }}
key: ${{ runner.os }}-gradle-${{ hashFiles('account-kit/rn-signer/example/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
8 changes: 3 additions & 5 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:

- name: Setup
uses: ./.github/actions/setup
with:
# skip android cache for this because it's not working with the publish step below
use-android-cache: false

- name: Set Github User Details
run: |
Expand All @@ -59,11 +62,6 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc

- name: Build all packages
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
run: yarn build:libs

# Lerna publish will, compute the new version, update files, run precommit hooks, tag, publish, and push change log
- name: Publish using Lerna
if: inputs.publish
Expand Down

0 comments on commit 5880cf0

Please sign in to comment.