Skip to content

Build and Release

Build and Release #5

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to create release for (e.g., v1.0.0)'
required: true
default: 'v1.0.0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Make gradlew executable
run: |
chmod +x gradlew
- name: Decode Keystore
run: |
echo "${{ secrets.KEY_STORE }}" | base64 --decode > app/keystore.jks
continue-on-error: true
- name: Create keystore properties file
run: |
echo "storePassword=${{ secrets.KEY_STORE_PASSWORD }}" > key.properties
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> key.properties
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> key.properties
echo "storeFile=keystore.jks" >> key.properties
continue-on-error: true
- name: Build APK
run: |
./gradlew assembleRelease
- name: Rename APK
run: |
mkdir -p release
cp app/build/outputs/apk/release/app-universal-release.apk release/GNet-universal.apk
cp app/build/outputs/apk/release/app-arm64-v8a-release.apk release/GNet-arm64-v8a.apk
cp app/build/outputs/apk/release/app-armeabi-v7a-release.apk release/GNet-armeabi-v7a.apk
- name: Get tag name
id: get_tag
run: |
if [[ $GITHUB_EVENT_NAME == 'workflow_dispatch' ]]; then
TAG_NAME=${{ github.event.inputs.tag }}
else
TAG_NAME=${GITHUB_REF#refs/tags/}
fi
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "Tag name: $TAG_NAME"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
name: Release ${{ env.TAG_NAME }}
draft: false
prerelease: false
files: |
release/GNet-universal.apk
release/GNet-arm64-v8a.apk
release/GNet-armeabi-v7a.apk
body: |
## GNet Release ${{ env.TAG_NAME }}
### Download Options
- [Universal APK (all architectures)](https://github.com/${{ github.repository }}/releases/download/${{ env.TAG_NAME }}/GNet-universal.apk) - Larger file size, compatible with all devices
- [ARM64-v8a APK](https://github.com/${{ github.repository }}/releases/download/${{ env.TAG_NAME }}/GNet-arm64-v8a.apk) - Optimized for 64-bit ARM devices
- [ARMv7a APK](https://github.com/${{ github.repository }}/releases/download/${{ env.TAG_NAME }}/GNet-armeabi-v7a.apk) - Optimized for 32-bit ARM devices
### Installation
1. Download the appropriate APK file for your device
2. Enable "Install from unknown sources" in your device settings
3. Open and install the APK
4. Launch GNet and enjoy your movies!
### Changelog
For a detailed changelog, please check the [commit history](https://github.com/${{ github.repository }}/commits/${{ env.TAG_NAME }}).