Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 52 additions & 0 deletions .github/workflows/create-expo-module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Create Expo Module

on:
push:
branches: [main, 'sdk-*']
paths:
- .github/workflows/create-expo-module.yml
- packages/create-expo-module/**
- yarn.lock
pull_request:
paths:
- .github/workflows/create-expo-module.yml
- packages/create-expo-module/**
- yarn.lock
schedule:
- cron: 0 14 * * *

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
node: [20, 22]
steps:
- name: 👀 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 100
- name: ⬇️ Fetch commits from base branch
run: git fetch origin ${{ github.event.before || github.base_ref || 'main' }}:${{ github.event.before || github.base_ref || 'main' }} --depth 100
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: ♻️ Restore caches
uses: ./.github/actions/expo-caches
id: expo-caches
with:
yarn-workspace: 'true'
- name: 🧶 Install node modules in root dir
run: yarn install --frozen-lockfile
- name: 🛠 Build create-expo-module
run: yarn prepare
working-directory: packages/create-expo-module
- name: 🧪 E2E Test create-expo-module
run: yarn test:e2e
working-directory: packages/create-expo-module
17 changes: 11 additions & 6 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: ./.github/actions/expo-caches
id: expo-caches
with:
yarn-workspace: 'true'
yarn-workspace: "true"
- name: 🧶 Install node modules in root dir
run: yarn install --frozen-lockfile
- name: Get the base commit
Expand All @@ -66,6 +66,7 @@ jobs:
working-directory: apps/bare-expo
previous-git-commit: ${{ steps.base-commit.outputs.base-commit }}
fingerprint-db-cache-path: .fingerprint.db
fingerprint-state-output-file: ${{ runner.temp }}/fingerprint-state.json

- name: 👀 Debug fingerprint
run: |
Expand Down Expand Up @@ -125,17 +126,19 @@ jobs:
id: old_comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'expo-bot'
comment-author: "expo-bot"
body-includes: <!-- pr-labeler comment -->
- name: 💬 Add comment with fingerprint
if: ${{ github.event_name == 'pull_request' && steps.fingerprint.outputs.previous-fingerprint != '' && steps.fingerprint.outputs.fingerprint-diff != '[]' && steps.old_comment.outputs.comment-id == '' }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.EXPO_BOT_GITHUB_TOKEN }}
script: |
const diff = JSON.stringify(${{ steps.fingerprint.outputs.fingerprint-diff}}, null, 2);
const fs = require('fs');
const state = JSON.parse(fs.readFileSync(process.env.RUNNER_TEMP + '/fingerprint-state.json', 'utf8'));
const diff = JSON.stringify(state.diff, null, 2);
const body = `<!-- pr-labeler comment -->
The Pull Request introduced fingerprint changes against the base commit: ${{ steps.fingerprint.outputs.previous-git-commit }}
The Pull Request introduced fingerprint changes against the base commit: ${state.previousGitCommitHash}
<details><summary>Fingerprint diff</summary>

\`\`\`json
Expand All @@ -160,9 +163,11 @@ jobs:
with:
github-token: ${{ secrets.EXPO_BOT_GITHUB_TOKEN }}
script: |
const diff = JSON.stringify(${{ steps.fingerprint.outputs.fingerprint-diff}}, null, 2);
const fs = require('fs');
const state = JSON.parse(fs.readFileSync(process.env.RUNNER_TEMP + '/fingerprint-state.json', 'utf8'));
const diff = JSON.stringify(state.diff, null, 2);
const body = `<!-- pr-labeler comment -->
The Pull Request introduced fingerprint changes against the base commit: ${{ steps.fingerprint.outputs.previous-git-commit }}
The Pull Request introduced fingerprint changes against the base commit: ${state.previousGitCommitHash}
<details><summary>Fingerprint diff</summary>

\`\`\`json
Expand Down
Loading
Loading