|
|
|
|
|
by aquariusDue
61 days ago
|
|
Also it works with private repos too if you provide a personal access token (fine-grained) in the Obtainium app settings. Just make sure to "release" (on the Releases tab) the .apk file on the GitHub repo and tag it latest. I use 'just' (command runner) and the 'gh' CLI to automate this: # Build and publish a GitHub release
release: apk
VERSION="v$(date +'%Y.%m.%d')-$(git rev-parse --short HEAD)"; \
APK="build/app/outputs/flutter-apk/app-release.apk"; \
REPO="$(git config --get remote.origin.url | sed -E 's#.*github.com[:/](.*)\.git#\1#')"; \
echo "Releasing $VERSION to $REPO"; \
git tag "$VERSION" 2>/dev/null || true; \
git push origin "$VERSION"; \
gh release create "$VERSION" "$APK" \
--repo "$REPO" \
--title "$VERSION" \
--notes "Automated release for $VERSION" \
|| gh release upload "$VERSION" "$APK" --repo "$REPO" --clobber
|
|