|
| 1 | +name: TFJS Nightly Release and Publish Test |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 5 * * *' # Runs daily at 5:00 AM UTC |
| 6 | + workflow_dispatch: # Allows manual triggering |
| 7 | + |
| 8 | +permissions: |
| 9 | + contents: read # Default permissions, adjust if the script needs to write to the repo |
| 10 | + |
| 11 | +jobs: |
| 12 | + nightly_release_verification: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - name: Checkout Repository |
| 16 | + uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Setup Bazel |
| 19 | + uses: bazel-contrib/[email protected] |
| 20 | + with: |
| 21 | + bazelisk-cache: true |
| 22 | + disk-cache: ${{ github.workflow }}-nightly-release |
| 23 | + repository-cache: true |
| 24 | + |
| 25 | + - name: Setup Node.js and Yarn |
| 26 | + uses: actions/setup-node@v4 |
| 27 | + with: |
| 28 | + node-version: 20.x # Using a current LTS version of Node.js |
| 29 | + cache: 'yarn' |
| 30 | + |
| 31 | + - name: Install Yarn globally (if not already cached by setup-node with yarn cache) |
| 32 | + run: npm i -g yarn |
| 33 | + |
| 34 | + - name: Install top-level dependencies |
| 35 | + run: yarn install --frozen-lockfile |
| 36 | + |
| 37 | + - name: Run Nightly Verdaccio Test Script |
| 38 | + env: |
| 39 | + RELEASE: 'true' # Set RELEASE to true as in the original config |
| 40 | + run: | |
| 41 | + set -eEuo pipefail |
| 42 | + yarn release-tfjs --dry --guess-version release --use-local-changes --force |
| 43 | + # The original script changes directory to a temporary location created by the release script. |
| 44 | + # This assumes /tmp/ is accessible and the path structure is consistent. |
| 45 | + # If release-e2e.sh is relative to the checkout root after the release script prep, adjust path. |
| 46 | + if [ -d "/tmp/tfjs-release/tfjs/e2e/" ]; then |
| 47 | + cd /tmp/tfjs-release/tfjs/e2e/ |
| 48 | + bash scripts/release-e2e.sh |
| 49 | + else |
| 50 | + echo "Error: Expected directory /tmp/tfjs-release/tfjs/e2e/ not found after release script." |
| 51 | + exit 1 |
| 52 | + fi |
0 commit comments