fcaster/.forgejo/workflows/build.yml
MassiveBox 150348c391
All checks were successful
Build on Push and create Release on Tag / build (push) Successful in 14m26s
Add Forgejo CI
2025-05-31 17:49:30 +02:00

64 lines
No EOL
1.5 KiB
YAML

name: Build on Push and create Release on Tag
on:
push:
branches:
- main
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.24.3
- name: Setup Android NDK
id: setup-ndk
uses: https://github.com/nttld/setup-ndk@v1
with:
ndk-version: r27c
- name: Install requirements
run: |
apt-get update
apt-get install golang gcc libgl1-mesa-dev xorg-dev libxkbcommon-dev -y
go mod tidy
go install fyne.io/tools/cmd/fyne@latest
- name: Build app
run: |
cd app
echo "Building for Linux"
fyne package -os linux
echo "Building for Android"
fyne package -os android
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- name: Move artifacts
run: |
mkdir release
mv app/FCaster.apk release/
mv app/FCaster.tar.xz release/
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
overwrite: true
path: release
- name: Create release
if: github.ref_type == 'tag'
uses: actions/forgejo-release@v1
with:
direction: upload
release-dir: release
token: ${{ secrets.FORGE_TOKEN }}