Compare commits

5 Commits

Author SHA1 Message Date
julian 22aa22ce76 ci: correct apk location
Build and deploy the latest docker container / deploy (push) Successful in 51s
Build and release the latest android apk / rolling-release-apk (push) Successful in 4m53s
Build and release a versioned android apk / release-apk (push) Successful in 4m31s
2026-06-12 18:24:37 +02:00
julian d7d0668e29 Switch gradle home to local to fix gradle build in ci
Build and deploy the latest docker container / deploy (push) Successful in 46s
Build and release the latest android apk / rolling-release-apk (push) Successful in 4m13s
2026-06-12 09:07:38 +02:00
julian 76edfc5721 Remove jenkinsfile
Build and deploy the latest docker container / deploy (push) Successful in 46s
Build and release the latest android apk / rolling-release-apk (push) Failing after 12s
2026-06-12 09:00:54 +02:00
julian 99a79d8df9 devenv: remove unneeded deploy-android code
Build and deploy the latest docker container / deploy (push) Successful in 53s
Build and release the latest android apk / rolling-release-apk (push) Failing after 11s
2026-06-12 09:00:27 +02:00
julian 3affa455d0 ci: rework workflows to add one for android 2026-06-12 09:00:10 +02:00
6 changed files with 64 additions and 98 deletions
@@ -1,4 +1,4 @@
name: Build and Deploy name: Build and deploy the latest docker container
on: on:
push: push:
branches: branches:
@@ -0,0 +1,37 @@
name: Build and release the latest android apk
on:
push:
branches:
- master
jobs:
rolling-release-apk:
runs-on: nixos
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build apk
run: devenv shell build-android
- name: Move latest Tag
run: |
git config user.name "gitea-actions"
git config user.email "gitea-actions@localhost"
# Forcefully creates/moves the 'latest' tag to the current commit
git tag -f latest
# Force-pushes the updated tag back to your Gitea repository
git push origin -f latest
- name: Update Gitea Release & Swap APK
uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch'
with:
tag_name: latest # Explicitly target the tag we just moved
name: 'Latest Development Build'
body: 'This rolling release is automatically generated and always contains the newest code from the main branch.'
files: build/app/outputs/flutter-apk/*.apk
token: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,23 @@
name: Build and release a versioned android apk
on:
push:
tags:
- 'v*'
jobs:
release-apk:
runs-on: nixos
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build apk
run: devenv shell build-android
- name: Create Gitea Release & Upload APK
uses: akkuman/gitea-release-action@v1
env:
NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18
with:
files: build/app/outputs/flutter-apk/*.apk
token: ${{ secrets.GITHUB_TOKEN }}
+1
View File
@@ -56,3 +56,4 @@ devenv.local.nix
.android .android
android/app/.cxx/ android/app/.cxx/
/.gradle/ /.gradle/
/.gitea/workflows/.gradle/
Vendored
-93
View File
@@ -1,93 +0,0 @@
pipeline {
agent {
node {
label 'devenv'
}
}
triggers {
pollSCM('H/10 * * * *')
}
stages {
stage('Test devenv') {
steps {
sh 'devenv test'
}
}
stage('Flutter builds') {
steps {
sh 'devenv shell dart run pdfrx:remove_wasm_modules --revert' // Make sure WASM is put in output
sh 'devenv shell flutter build web --release'
sh 'devenv shell dart run pdfrx:remove_wasm_modules' // NOT idempotent!
sh 'devenv shell flutter build apk --release'
sh 'devenv shell dart run pdfrx:remove_wasm_modules --revert' // Reset again, just to be sure
}
}
stage('Parallel Deploy') {
parallel {
stage('Web') {
steps {
sh 'docker build -t harbor.julian-mutter.de/sheetless/sheetless-frontend .'
withDockerRegistry([credentialsId: 'harbor', url: 'https://harbor.julian-mutter.de']) {
sh 'docker push harbor.julian-mutter.de/sheetless/sheetless-frontend'
}
}
}
stage('Android') {
stages {
stage('Checkout F-Droid Repo') {
steps {
dir("fdroid-repo") {
git branch: 'master', url: "https://gitlab.julian-mutter.de/julian/fdroid-frajul.git", credentialsId: "gitea", poll: "false"
}
}
}
stage('Decrypt keys') {
steps {
dir("fdroid-repo") {
sh 'devenv shell ./decrypt.sh'
}
}
}
stage('Copy APK') {
steps {
sh "cp build/app/outputs/apk/release/app-release.apk fdroid-repo/fdroid/repo/sheetless.apk"
}
}
stage('Update Metadata') {
steps {
dir("fdroid-repo") {
sh 'devenv shell ./update-repo.sh'
}
}
}
stage('Push updates') {
steps {
dir("fdroid-repo") {
withCredentials([gitUsernamePassword(credentialsId: 'gitea')]) {
sh '''
git config --global user.email "jenkins@comumail.de"
git config --global user.name "Jenkins CI"
./push-updates.sh
'''
}
}
}
}
}
}
}
}
}
post {
always {
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: emailextrecipients([developers(), requestor()])])
cleanWs()
}
}
}
+2 -4
View File
@@ -62,14 +62,12 @@
''; '';
build-android.exec = '' build-android.exec = ''
export GRADLE_USER_HOME="$(pwd)/.gradle"
dart run pdfrx:remove_wasm_modules --revert // Make sure WASM is put in output dart run pdfrx:remove_wasm_modules --revert // Make sure WASM is put in output
dart run pdfrx:remove_wasm_modules // NOT idempotent! dart run pdfrx:remove_wasm_modules // NOT idempotent!
flutter build apk --release flutter build apk --release
''; '';
deploy-android.exec = ''
echo "TBD"
'';
}; };
} }