Chores: Reconsidered logo #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'eas.json' | |
- 'app.json' | |
- 'babel-config.js' | |
- 'package.json' | |
- 'package-lock.json' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Setup repo | |
uses: actions/checkout@v3 | |
- name: π Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: npm | |
- name: π Setup EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: π¦ Install dependencies | |
run: npm install | |
- name: π Build app | |
run: eas build --profile preview --platform android --non-interactive | |
- name: π Fetch latest build URL | |
run: | | |
BUILD_INFO=$(eas build:list --json --limit=1 --platform=android --non-interactive) | |
BUILD_URL=$(echo $BUILD_INFO | jq -r '.[0].artifacts.buildUrl') | |
echo "Build URL: $BUILD_URL" | |
echo "BUILD_URL=$BUILD_URL" >> $GITHUB_ENV | |
- name: π Update GitHub Repository Website Field | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BUILD_URL: ${{ env.BUILD_URL }} | |
run: | | |
curl \ | |
-X PATCH \ | |
-H "Authorization: token ${{ secrets.GITHUB_PAT }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/0x0is1/lissen-mobile \ | |
-d '{"homepage": "'"$BUILD_URL"'"}' |