kiwix-android icon indicating copy to clipboard operation
kiwix-android copied to clipboard

Additional F-Droid repository for nightly

Open JensKorte opened this issue 5 years ago • 19 comments

Is your feature request related to a problem? Please describe. I have no Playstore Account and therefore I cannot get the nightly version easily. I have to download it from https://download.kiwix.org/nightly/.

Describe the solution you'd like

It would be great, if kiwix had a F-Droid repository for nightlies like repos listed in https://forum.f-droid.org/t/known-repositories/721. See also: https://f-droid.org/en/repomaker/

Describe alternatives you've considered F-Droid themselves could have a nightly/developer repository where the beta/nightly versions of apps are listed.

Additional context Since this is a very low priority issue this issue can be closed quite fast.

JensKorte avatar Feb 16 '20 18:02 JensKorte

Sounds doable...

kelson42 avatar Feb 16 '20 18:02 kelson42

@kelson42 @macgills Would like to do this! Please assign.

dipu989 avatar Mar 04 '20 20:03 dipu989

@kelson42 @macgills We need to make a Kiwix repo on Fdroid that hosts our nightly builds via Gitlab? Is the approach correct? References - https://android.izzysoft.de/articles/named/fdroid-intro-3?lang=en

dipu989 avatar Mar 06 '20 09:03 dipu989

This is the file we have on fdroids repository that dictates what gets hosted on fdroid.

I really can't help you much as I have only ever done 1 update to that file and most of fdroid is still very confusing to me. Maybe the repomaker link in the description of this ticket is useful?

macgills avatar Mar 11 '20 16:03 macgills

The repomaker is imho the best way. You can create your own repo on your own server and a user can add the repo adress (https://...) in F-Droid at (translated from the german F-Droid) "Options" -> "packet sources" -> "+" You can even do this for closed source software, e.g. the german tagesschau app. There is no source available.

JensKorte avatar Mar 13 '20 06:03 JensKorte

@JensKorte @macgills Please don't mix with #1777. #1777 is not the solution for this ticket. I want Kiwix is the standard FDroid repo and this is the most important. The solution here is just to make the FDroid PR work fine (or does the option to avoid signing just fail like suggested in FDroid PR?).

kelson42 avatar Mar 13 '20 15:03 kelson42

@kelson42 this is #1777 .

I was just giving dipu the only information I have as regards fdroid. I don't know how automatic publishing will work because we certainly can't set it up for the actual releases of the app on fdroid so I would think this ticket is mildly doomed for the time being

macgills avatar Mar 13 '20 15:03 macgills

@macgills Sorry... In addition to push to download.kiwix.org we should push to this repo. (wherever he is...). So this is not about releases, this is only for nightlies.

kelson42 avatar Mar 13 '20 15:03 kelson42

The new repo doesn't work like how the fdroid repo does? We can just hit an endpoint with an apk? If so perfect, if we can't and have to do it the way fdroid do it we are stuck the same way we are for our real releases

macgills avatar Mar 13 '20 15:03 macgills

The new repo doesn't work like how the fdroid repo does? We can just hit an endpoint with an apk? If so perfect, if we can't and have to do it the way fdroid do it we are stuck the same way we are for our real releases

I am not sure, if I get you right. In an F-Droid repo there can be different versions of a program, there is a recommended version and the user can select to up-/downgrade to an alpha or older version. kiwix-nightly could be the package name, then it is not mixed up with kiwix. If you want to provide test versions like different branches, I would suggest to provide an extra package with a name like kiwix-<branchname>.

JensKorte avatar Mar 13 '20 17:03 JensKorte

Yes but I currently don't believe we have an easy way of automatically updating this "nightly repo" as I would assume the update mechanism is similar to on the main fdroid repo which we currently cannot support because we need to supply an endpoint with version codes.

Our nightly builds are also development versions if i remember correctly, they are intended for nobody but developers.

macgills avatar Mar 16 '20 15:03 macgills

Our nightly builds are also development versions if i remember correctly, they are intended for nobody but developers.

I am no developer, but I can help with beta testing.

JensKorte avatar Mar 17 '20 08:03 JensKorte

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

stale[bot] avatar May 16 '20 08:05 stale[bot]

@kelson42 @MohitMaliFtechiz Since we are on F-Droid now. Now it's the perfect time to deploy nightly automatically. I can make a PR that CI automatically puts nightly APK to F-Droid.

gouri-panda avatar Aug 07 '22 11:08 gouri-panda

@MohitMaliDeveloper @gouri-panda It seems this has not been fixed fully. Please explain what is the current problem.

kelson42 avatar Aug 13 '22 09:08 kelson42

@kelson42 According to documentation We have to follow these steps:

  • Create a new Github “project” by appending -nightly to the name. For example, https://gitlab.com/fdroid/fdroidclient becomes https://gitlab.com/fdroid/fdroidclient-nightly and https://gitlab.com/eighthave/fdroidclient becomes https://gitlab.com/eighthave/fdroidclient-nightly

  • In that new project, add the SSH Public Key derived from your debug.keystore as a Deploy Key in your Repository Settings, e.g. https://github.com/kiwix/kiwix-android-nightly/settings/keys

  • In the Settings of the project being built, find “Actions” under “Secrets” in the “Security” section. Paste the whole DEBUG_KEYSTORE output line into a new repository secret called DEBUG_KEYSTORE, e.g. https://github.com/kiwix/kiwix-android/settings/secrets/actions.

  • Add a nightly stage to your .github/workflows/ that produces only the build to publish to the nightly, then runs fdroid nightly. For example:

name: Publish nightly build

on:
  push:
    branches:
      - main

jobs:
  nightly:
    name: Publish nightly build
    runs-on: ubuntu-latest
    environment: nightly
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Gradle Wrapper Validation
        uses: gradle/wrapper-validation-action@v1
      - name: Set up JDK 11
        uses: actions/setup-java@v2
        with:
          distribution: 'adopt'
          java-version: 11
      - name: Build
        run: |
          # use timestamp as Version Code
          export versionCode=$(date '+%s')
          sed -i "s,^\(\s*versionCode\)  *[0-9].*,\1 $versionCode," app/build.gradle
          ./gradlew assembleDebug
      - name: fdroid nightly
        run: |
          sudo add-apt-repository ppa:fdroid/fdroidserver
          sudo apt-get update
          sudo apt-get install apksigner fdroidserver --no-install-recommends
          export DEBUG_KEYSTORE=$\{\{ secrets.DEBUG_KEYSTORE \}\}
          fdroid nightly --archive-older 10

More info here

gouri-panda avatar Aug 18 '22 09:08 gouri-panda

@gouri-panda If i create the repo, you can do the rest?

kelson42 avatar Sep 02 '22 12:09 kelson42

@kelson42 Yes!

gouri-panda avatar Sep 02 '22 12:09 gouri-panda

https://github.com/kiwix/kiwix-android-nightly

kelson42 avatar Sep 02 '22 12:09 kelson42