mirror of
https://github.com/Ujwal223/FocusGram.git
synced 2026-07-04 02:07:52 +02:00
Compare commits
10 Commits
MIdway-PUsh
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c9ec258696 | |||
| 98049b5858 | |||
| 14439a4aab | |||
| 3d74e30360 | |||
| 3ec122c03b | |||
| 99a581ad01 | |||
| 65796c8e9e | |||
| 6d48682b39 | |||
| 7cb4d62cbe | |||
| 335f6467bc |
@@ -1,4 +1,5 @@
|
|||||||
name: Build APK and Create GitHub Release
|
name: Build APK and Create GitHub Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -6,28 +7,35 @@ on:
|
|||||||
description: "Release version without leading v. Example: 1.0.0. Leave empty to read the top CHANGELOG heading."
|
description: "Release version without leading v. Example: 1.0.0. Leave empty to read the top CHANGELOG heading."
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Java 17
|
- name: Set up Java 17
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: "17"
|
java-version: "17"
|
||||||
|
|
||||||
- name: Set up Android SDK
|
- name: Set up Android SDK
|
||||||
uses: android-actions/setup-android@v4
|
uses: android-actions/setup-android@v4
|
||||||
|
|
||||||
- name: Set up Flutter
|
- name: Set up Flutter
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: stable
|
channel: stable
|
||||||
cache: true
|
cache: true
|
||||||
|
|
||||||
- name: Install required Android SDK packages
|
- name: Install required Android SDK packages
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -36,9 +44,11 @@ jobs:
|
|||||||
"platform-tools" \
|
"platform-tools" \
|
||||||
"platforms;android-35" \
|
"platforms;android-35" \
|
||||||
"build-tools;34.0.0" \
|
"build-tools;34.0.0" \
|
||||||
"build-tools;35.0.0" \
|
"build-tools;35.0.0"
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: flutter pub get
|
run: flutter pub get
|
||||||
|
|
||||||
- name: Resolve version and tag
|
- name: Resolve version and tag
|
||||||
id: meta
|
id: meta
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -53,21 +63,79 @@ jobs:
|
|||||||
TAG="v${VERSION}"
|
TAG="v${VERSION}"
|
||||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Extract release notes from CHANGELOG.md
|
- name: Extract release notes from CHANGELOG.md
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ steps.meta.outputs.version }}
|
VERSION: ${{ steps.meta.outputs.version }}
|
||||||
run: python3 .github/scripts/get_notes.py
|
run: python3 .github/scripts/get_notes.py
|
||||||
|
|
||||||
|
- name: Decode Android keystore
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
mkdir -p android/app
|
||||||
|
# tr -d strips any newlines/spaces introduced when the secret was stored
|
||||||
|
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" \
|
||||||
|
| tr -d '[:space:]' \
|
||||||
|
| base64 --decode > android/app/upload-keystore.jks
|
||||||
|
chmod 600 android/app/upload-keystore.jks
|
||||||
|
echo "Keystore written: $(wc -c < android/app/upload-keystore.jks) bytes"
|
||||||
|
|
||||||
|
- name: Create Android key.properties
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||||
|
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||||
|
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
# Trim any accidental whitespace/newlines from secret values
|
||||||
|
KS_PASS="$(printf '%s' "${KEYSTORE_PASSWORD}" | tr -d '[:space:]')"
|
||||||
|
K_PASS="$(printf '%s' "${KEY_PASSWORD}" | tr -d '[:space:]')"
|
||||||
|
K_ALIAS="$(printf '%s' "${KEY_ALIAS}" | tr -d '[:space:]')"
|
||||||
|
# Absolute path prevents Gradle from misresolving a relative storeFile
|
||||||
|
KEYSTORE_PATH="${GITHUB_WORKSPACE}/android/app/upload-keystore.jks"
|
||||||
|
{
|
||||||
|
printf 'storePassword=%s\n' "${KS_PASS}"
|
||||||
|
printf 'keyPassword=%s\n' "${K_PASS}"
|
||||||
|
printf 'keyAlias=%s\n' "${K_ALIAS}"
|
||||||
|
printf 'storeFile=%s\n' "${KEYSTORE_PATH}"
|
||||||
|
} > android/key.properties
|
||||||
|
|
||||||
|
- name: Verify keystore
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
KS_PASS="$(printf '%s' "${KEYSTORE_PASSWORD}" | tr -d '[:space:]')"
|
||||||
|
echo "=== Keystore file ==="
|
||||||
|
ls -lh android/app/upload-keystore.jks
|
||||||
|
file android/app/upload-keystore.jks
|
||||||
|
echo ""
|
||||||
|
echo "=== key.properties keys (values hidden) ==="
|
||||||
|
cut -d'=' -f1 android/key.properties
|
||||||
|
echo ""
|
||||||
|
echo "=== Keystore verification via keytool ==="
|
||||||
|
keytool -list \
|
||||||
|
-keystore android/app/upload-keystore.jks \
|
||||||
|
-storepass "${KS_PASS}" \
|
||||||
|
2>&1 | grep -vE "^(Warning|$)"
|
||||||
|
|
||||||
- name: Build release APK
|
- name: Build release APK
|
||||||
run: flutter build apk --release
|
run: flutter build apk --release
|
||||||
|
|
||||||
- name: Rename APK
|
- name: Rename APK
|
||||||
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/focusgram-release.apk
|
run: mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/focusgram-release.apk
|
||||||
|
|
||||||
- name: Upload APK artifact
|
- name: Upload APK artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: focusgram-apk-${{ steps.meta.outputs.tag }}
|
name: focusgram-apk-${{ steps.meta.outputs.tag }}
|
||||||
path: build/app/outputs/flutter-apk/focusgram-release.apk
|
path: build/app/outputs/flutter-apk/focusgram-release.apk
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Create Git tag
|
- name: Create Git tag
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
@@ -82,6 +150,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
git tag -a "${TAG}" -m "Release ${TAG}"
|
git tag -a "${TAG}" -m "Release ${TAG}"
|
||||||
git push origin "${TAG}"
|
git push origin "${TAG}"
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v3
|
uses: softprops/action-gh-release@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://flutter.dev)
|
[](https://flutter.dev)
|
||||||
[](https://github.com/ujwal223/focusgram/releases)
|
[](https://github.com/ujwal223/focusgram/releases)
|
||||||
|
|
||||||
<a href='https://focusgram.en.uptodown.com/android' title='Download FocusGram'>
|
<a href='https://focusgram.en.uptodown.com/android' title='Download FocusGram'>
|
||||||
<img src='https://stc.utdstc.com/img/mediakit/download-gio-small.png' alt='Download FocusGram on Uptodown'>
|
<img src='https://stc.utdstc.com/img/mediakit/download-gio-small.png' alt='Download FocusGram on Uptodown'>
|
||||||
@@ -28,7 +28,7 @@ FocusGram is an Android-only app that loads the Instagram website with the distr
|
|||||||
>
|
>
|
||||||
> [](https://buymemomo.com/ujwal)
|
> [](https://buymemomo.com/ujwal)
|
||||||
|
|
||||||
<img width="1920" height="1080" alt="FocusGram App Screenshots" src="https://github.com/user-attachments/assets/cffd4012-4cf3-4ba8-aa1a-883e1f85478e" />
|
<img width="1920" height="1080" alt="FocusGram App Screenshots" src="https://raw.githubusercontent.com/Ujwal223/FocusGram/refs/heads/main/assets/images/app-demo.png" />
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"show": true,
|
||||||
|
"id": "popup_005",
|
||||||
|
"header": "App Update NOtice!",
|
||||||
|
"body": "New App Update is available, if you havent updated to V2.0.0 then you can just update the app normally. But If you are in v2.0.0 you must delete it and install new version. (i forgot to sign V2)",
|
||||||
|
"max_shows": 2,
|
||||||
|
"button_text": "Sucks Man..."
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user