Skip to content

Commit

Permalink
Added GH homepage auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0is1 committed Oct 13, 2024
1 parent 7f34e61 commit 36d48e0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/eas-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- 'package.json'
- 'package-lock.json'


jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -34,3 +33,22 @@ jobs:

- 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"'"}'

0 comments on commit 36d48e0

Please sign in to comment.