ClojureDart CI/CD with Fastlane

… sure has a lot of steps.

Anyway, pretty much everything you need to know is explained extremely well here: https://constantsolutions.dk/2024/06/06/automate-flutter-deployments-to-app-store-and-play-store-using-fastlane-and-github-actions/

Bonus points if you run the dart script without looking at the source code first.

The only changes you need to make this work for clojuredart are inside deploy-with-fastlane.yaml:

First, a comment in that blog pointed out these changes that I had to add to the build_ios workflow.

- name: Run Flutter tasks
        uses: subosito/flutter-action@v2.16.0
        with:
          channel: ${{ env.FLUTTER_CHANNEL }}
          cache: true

      - name: Get Flutter dependencies
        run: flutter pub get

      - name: Install CocoaPods dependencies
        run: |
          cd ios
          pod install

      - name: Build iOS app
        run: |
          flutter clean
          flutter build ios --release --no-codesign

      - uses: maierj/fastlane-action@v3.1.0
        with:
            lane: 'release_app_store'
            subdirectory: ios
            options: '{ "version_number": "${{ github.ref_name }}", "verbose": "true" }'

Then, add the cljd setup to the top of build_android & build_ios:

- name: Prepare java
        uses: actions/setup-java@v3
        with:
          distribution: 'zulu'
          java-version: '21'

      - name: Install clojure tools
        uses: DeLaGuardo/setup-clojure@13.0
        with:
          cli: 1.10.1.693

You might have to decrease java-version to 17, but this worked for me. Then, after the Run Flutter tasks step:

- name: Compile cljd
        run: |
          clojure -M:cljd clean
          clojure -M:cljd compile

If you get a mysterious and plain "Error..", you might have to increase the timeout-minutes in the build_android/build_ios blocks.

All I had to do beyond the above was fix a bunch of mysterious iOS errors that were mainly due to me not being familiar with ruby environments. Skill issue.

Previous
Previous

Two months of mistakes

Next
Next

Disorganized is out… now!