Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EAS Build workflow so it builds the requesting PR branch #27

Merged
merged 6 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/workflows/easBuild.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: EAS Build
run-name: '${{ github.workflow }} - Requested by @${{github.actor}} (Run #${{github.run_number}})'
on:
workflow_dispatch:
issue_comment:
types: [created]
jobs:
Expand All @@ -14,10 +15,32 @@ jobs:
}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Get PR branch
if: github.event_name != 'workflow_dispatch'
uses: xt0rted/pull-request-comment-branch@v2
id: pr-branch-info

- name: Set commit status as pending
if: github.event_name != 'workflow_dispatch'
uses: myrotvorets/[email protected]
with:
node-version: 18.x
sha: ${{ steps.pr-branch-info.head_sha }}
status: pending

- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: |
${{
github.event_name != 'workflow_dispatch' &&
steps.comment-branch.outputs.head_ref ||
github.sha
}}

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: npm

- name: Setup EAS
Expand All @@ -32,3 +55,10 @@ jobs:

- name: 🏗 Build on EAS
run: eas build --platform android --profile preview --non-interactive

- name: Set final commit status
uses: myrotvorets/[email protected]
if: always() && github.event_name != 'workflow_dispatch'
with:
sha: ${{ steps.pr-branch-info.head_sha }}
status: ${{ job.status }}
8 changes: 4 additions & 4 deletions .github/workflows/lintTestBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 20.x
cache: npm
- name: Install deps
run: npm ci
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 20.x
cache: npm
- name: Install deps
run: npm ci
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 20.x
cache: npm
- name: Install deps
run: npm ci
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 20.x
cache: npm
- name: Install deps
run: npm ci
Expand Down
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"eas": {
"projectId": "d0403539-b262-43fb-8bf5-25a9277b9181"
}
}
},
"owner": "ekswhyzed"
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"private": true,
"volta": {
"node": "20.13.1",
"npm": "10.8.0"
"// npm v10.8.0 breaks --json outputs": "",
"npm": "10.7.0"
},
"scripts": {
"start": "expo start --tunnel",
Expand Down
Loading