Skip to content

Commit 8cc1d6e

Browse files
committed
comment build steps
1 parent a22909c commit 8cc1d6e

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

.github/workflows/eas-build.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,19 @@
1515
# Based on the ANDROID and IOS inputs, we trigger the build for the corresponding platform with the corresponding flags.
1616

1717
# 🚨 GITHUB SECRETS REQUIRED:
18-
# - EXPO_TOKEN: Expo token to authenticate with EAS
19-
# - You can get it from https://expo.dev/settings/access-tokens
20-
18+
# - EXPO_TOKEN: Expo token to authenticate with EAS to sync version numbers and submit the build.
19+
# You can get it from https://expo.dev/settings/access-tokens
20+
# - NEW_VERSION_NUMBER_PAT: A fine-grained Personal Access Token.
21+
# This token is used to commit and push to protected branches.
22+
# You can generate one from here: https://github.com/settings/tokens?type=beta
23+
# Set the token name to something meaningful, e.g. "New version number PAT for <Project name>".
24+
# Set the Repository access to "Only select repositories" and select this repository.
25+
# Set the following Repo permissions:
26+
# - Contents: Read & write (to commit and push)
27+
# Make sure to add it to the repo secrets with the name NEW_VERSION_NUMBER_PAT:
28+
# - Go to Repository Settings > Secrets and variables > Actions > New repository secret
29+
# - Name: NEW_VERSION_NUMBER_PAT
30+
# - Value: The Personal Access Token you created
2131
name: 'EAS Build (Android & IOS) (EAS)'
2232

2333
on:
@@ -50,6 +60,8 @@ on:
5060
jobs:
5161
Build:
5262
runs-on: ${{ matrix.os }}
63+
permissions:
64+
contents: write
5365
environment: app-${{ inputs.environment }}
5466
strategy:
5567
fail-fast: false
@@ -61,12 +73,16 @@ jobs:
6173
- platform: android
6274
os: ubuntu-latest
6375
steps:
64-
- name: Check for EXPO_TOKEN
76+
- name: Check if all required secrets exist
6577
run: |
6678
if [ -z "${{ secrets.EXPO_TOKEN }}" ]; then
6779
echo "You must provide an EXPO_TOKEN secret linked to this project's Expo account in this repo's secrets. Learn more: https://docs.expo.dev/eas-update/github-actions"
6880
exit 1
6981
fi
82+
if [ -z "${{ secrets.NEW_VERSION_NUMBER_PAT }}" ]; then
83+
echo "echo "NEW_VERSION_NUMBER_PAT secret not found. Please create a fine-grained Personal Access Token following the instructions in the workflow file.""
84+
exit 1
85+
fi
7086
7187
- name: 📦 Setup Expo and EAS
7288
uses: expo/expo-github-action@v8
@@ -78,6 +94,7 @@ jobs:
7894
uses: actions/checkout@v3
7995
with:
8096
fetch-depth: 0
97+
token: ${{ secrets.NEW_VERSION_NUMBER_PAT }}
8198

8299
- name: 📦 Setup Node + PNPM + install deps
83100
uses: ./.github/actions/setup-node-pnpm-install
@@ -88,13 +105,15 @@ jobs:
88105
- name: Update version in package.json
89106
if: inputs.new-version
90107
run: |
91-
pnpm version ${{ inputs.new-version }}
108+
git config --global user.name "github-actions[bot]"
109+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
110+
pnpm version ${{ inputs.new-version }} -m "chore: set app version to ${{ inputs.new-version }}"
92111
93-
- name: ⚙️ Run Prebuild
94-
run: pnpm prebuild:${{ inputs.environment }}
112+
# - name: ⚙️ Run Prebuild
113+
# run: pnpm prebuild:${{ inputs.environment }}
95114

96-
- name: 📱 Run Build for ${{ matrix.platform }}
97-
run: pnpm build:${{ inputs.environment }}:${{ matrix.platform }} --non-interactive --no-wait --message "Build ${{ inputs.environment }} for ${{ matrix.platform }}" --local
115+
# - name: 📱 Run Build for ${{ matrix.platform }}
116+
# run: pnpm build:${{ inputs.environment }}:${{ matrix.platform }} --non-interactive --no-wait --message "Build ${{ inputs.environment }} for ${{ matrix.platform }}" --local
98117

99118
- name: 📦 Push changes to repository
100119
if: inputs.new-version

0 commit comments

Comments
 (0)