Kyoo/.github/workflows/native-update.yml
renovate[bot] 1eb832f00d
chore(deps): update actions/setup-node action to v6 (#1114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 09:42:09 +02:00

52 lines
1.5 KiB
YAML

name: Native update
on:
push:
tags:
- v*
jobs:
update:
name: Expo Update
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./front
steps:
- name: Checkout repository
uses: actions/checkout@v5
# This is required because GHA doesn't support secrets in the `if` condition
- name: Check if Expo build is enabled
env:
IS_SECRET_SET: ${{ env.IS_EXPO_ENABLED == 'true' && 'true' || 'false' }}
run: echo "IS_EXPO_ENABLED=${IS_SECRET_SET}" >> "${GITHUB_ENV}"
- name: Log if Expo build is disabled due to fork
if: env.IS_EXPO_ENABLED != 'true'
run: |
echo "Expo build is disabled for forks. To enable it, add an EXPO_TOKEN secret to this repository. See https://docs.expo.dev/eas-update/github-actions/ for more information."
- name: Setup Node
uses: actions/setup-node@v6
if: env.IS_EXPO_ENABLED == 'true'
with:
node-version: 22.x
cache: yarn
cache-dependency-path: front/yarn.lock
- name: Setup Expo
uses: expo/expo-github-action@v8
if: env.IS_EXPO_ENABLED == 'true'
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
if: env.IS_EXPO_ENABLED == 'true'
run: yarn install --immutable
- name: Publish update
if: env.IS_EXPO_ENABLED == 'true'
run: yarn update