desmos-labs / mooncake

The first decentralized social app based on Desmos
MIT License
46 stars 14 forks source link

Implement the automatic publishing of new app versions #42

Open RiccardoM opened 4 years ago

RiccardoM commented 4 years ago

Currently when a new version is ready to be published, we have to compile it and publish it by hand every time. What it would be ideal to have is an automatic system that when needed publishes both the Android and iOS versions to the respective beta testing programs automatically.

I think that this can be achieved pretty easily by:

  1. Switching the CI system to GitHub actions.
  2. Creating proper workflows for the two platforms.

Point 1 is tracked inside #41.

About point 2, I've found the following resources that might be interested to check out:

Let me know what you think @ryuash

kwunyeung commented 4 years ago

Didn't know about the Apple's TestFlight Action exist!

RiccardoM commented 4 years ago

Update after trying the iOS implementation

With #54 I've been trying to implement the automatic signing and publish to Testflight of the iOS version of Mooncake the whole day.

While with Android (#49) I was able to make it work pretty easily, I had a lot of problems with Flutter.

First of all, it was hard to get the correct signing certificates properly installed inside the CI itself, but in the end I was able to sort it out properly (thanks @kwunyeung for the help). Once those were setup, I tried implementing the effective signing of the app to later publish it to Testflight.

I've tried setting up both of the following commands to run:

- name: Build 🔧
    run: |
    flutter pub get
    cd ios
    pod install
    xcodebuild -workspace Runner.xcworkspace \
      -scheme Runner \
      -sdk iphoneos \
      -configuration AppStoreDistribution \
      -archivePath $PWD/build/Mooncake.xcarchive \
    clean archive | xcpretty
    ls $PWD/build
- name: Build 🔧
  run: |
    flutter pub get
    flutter build ios --release

Unfortunately, both of those CIs have been running for more than 50 minutes without any result whatsover, before I decided to stop them (first config run, second config run).

As far as I've been able to comprehend, this is caused by a Flutter bug which I was not able to find, but which is also mentioned inside this comment.

Looking at the Flutter documentation, they suggest to use fastlane when implementing CD for Flutter.

I'll try this approach in the following days and let you know. I just wanted to log this to make sure we have a reminder of what has been done in the past if we search it in the future.

CC @ryuash

RiccardoM commented 4 years ago

After trying using Fastlane, even that method failed. I'm now putting this issue on hold because I think it's a Flutter problem.