fix: resolve pnpm monorepo Metro bundling + add GitHub release workflow
- Add babel-preset-expo as explicit devDep (fixes "Cannot find module" crash) - Configure metro.config.js with watchFolders for pnpm workspace root - Bump expo devDep to ~54.0.34, remove duplicate deps/devDeps - Add .github/workflows/release.yml: signed APK on git tag vX.Y.Z Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
name: Release APK
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: artifacts/postiz-mobile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Install Expo CLI
|
||||
run: pnpm add -g expo-cli@latest || true
|
||||
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Accept Android SDK licenses
|
||||
run: yes | sdkmanager --licenses || true
|
||||
|
||||
- name: Install SDK components
|
||||
run: |
|
||||
sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0" "ndk;28.2.13676358"
|
||||
|
||||
- name: Decode keystore
|
||||
run: |
|
||||
mkdir -p ~/.config/postiz-mobile
|
||||
echo "${{ secrets.KEYSTORE_B64 }}" | base64 -d > ~/.config/postiz-mobile/postiz-mobile.jks
|
||||
cat > ~/.config/postiz-mobile/signing.env <<EOF
|
||||
KEYSTORE_PATH=~/.config/postiz-mobile/postiz-mobile.jks
|
||||
KEYSTORE_ALIAS=${{ secrets.KEYSTORE_ALIAS }}
|
||||
KEYSTORE_STORE_PASSWORD=${{ secrets.KEYSTORE_STORE_PASSWORD }}
|
||||
KEYSTORE_KEY_PASSWORD=${{ secrets.KEYSTORE_KEY_PASSWORD }}
|
||||
EOF
|
||||
chmod 600 ~/.config/postiz-mobile/signing.env ~/.config/postiz-mobile/postiz-mobile.jks
|
||||
|
||||
- name: Build signed APK
|
||||
working-directory: artifacts/postiz-mobile
|
||||
run: ./build-apk.sh
|
||||
|
||||
- name: Find built APK
|
||||
id: apk
|
||||
run: |
|
||||
APK=$(ls artifacts/postiz-mobile/dist/*.apk | sort | tail -1)
|
||||
echo "path=$APK" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: "Postiz Mobile ${{ github.ref_name }}"
|
||||
body: |
|
||||
## Postiz Mobile ${{ github.ref_name }}
|
||||
|
||||
APK signé pour Android — installation directe (sideload).
|
||||
|
||||
### Installation
|
||||
1. Activer "Sources inconnues" sur l'appareil
|
||||
2. Transférer l'APK et ouvrir pour installer
|
||||
files: ${{ steps.apk.outputs.path }}
|
||||
draft: false
|
||||
prerelease: ${{ contains(github.ref_name, '-') }}
|
||||
Reference in New Issue
Block a user