120 lines
3.4 KiB
YAML
120 lines
3.4 KiB
YAML
name: Build APK and Linux
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
|
|
- name: Install Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev cmake ninja-build clang pkg-config libgtk-3-dev liblzma-dev
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install Poetry and dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install poetry
|
|
poetry config virtualenvs.create false
|
|
poetry install --without dev
|
|
|
|
- name: Build Linux package
|
|
run: poetry run flet build linux
|
|
|
|
- name: Upload Linux artifact
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: ren-browser-linux
|
|
path: build/linux
|
|
|
|
build-android:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
|
|
- name: Install Android dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y cmake ninja-build clang pkg-config
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install Poetry and dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install poetry
|
|
poetry config virtualenvs.create false
|
|
poetry install --without dev
|
|
|
|
- name: Build Android APK
|
|
run: poetry run flet build apk
|
|
|
|
- name: Upload APK artifact
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: ren-browser-apk
|
|
path: build/apk
|
|
|
|
create-release:
|
|
needs: [build-linux, build-android]
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
|
|
- name: Download Linux artifact
|
|
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
|
|
with:
|
|
name: ren-browser-linux
|
|
path: ./artifacts/linux
|
|
|
|
- name: Download APK artifact
|
|
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
|
|
with:
|
|
name: ren-browser-apk
|
|
path: ./artifacts/apk
|
|
|
|
- name: Create draft release
|
|
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836
|
|
if: github.ref_type == 'tag'
|
|
with:
|
|
draft: true
|
|
files: |
|
|
./artifacts/linux/*
|
|
./artifacts/apk/*
|
|
name: Release ${{ github.ref_name }}
|
|
body: |
|
|
## Release ${{ github.ref_name }}
|
|
|
|
This release contains:
|
|
- Linux binary package
|
|
- Android APK package |