mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-23 17:52:36 -04:00
52 lines
1.5 KiB
YAML
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@v4
|
|
|
|
# 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@v4
|
|
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
|