Build Your .NET MAUI Android App with GitHub Actions

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

Комментарии • 48

  • @jfversluis
    @jfversluis  2 года назад +1

    Want to learn more about publishing your apps to the store and everything needed for that? Be sure to check this playlist: ruclips.net/video/FNwv_W3TtSU/видео.html
    If you're interested in building your Windows app the same way, go right to this video: ruclips.net/video/GQuQPm40kys/видео.html

  • @louiswerth8366
    @louiswerth8366 2 года назад +1

    Thank you, much needed tutorial for the community

    • @jfversluis
      @jfversluis  2 года назад

      Thanks Louis! The basics of building were easy. But the key store part is not very straightforward. Hope this will help people!

  • @davidkroods811
    @davidkroods811 7 месяцев назад +2

    Dear Gerald i have a question if you could help i would be appreciated, i'm trying to publish MAUI app with github actions, but in your tutorial i dont see property /p:AndroidKeyStore=true, the problem is that default value is false so that in case i dont specify this property the app wont be signed even if you specify keystore and the password, and so when i add this prop to publish command to have final published apk i get error apparently that keystore file couldn't be found, so i'm stuck 2 days with this headache, and if i dont add this property it builds successfully, Thank you for your time.

    • @asMmmaok
      @asMmmaok 7 месяцев назад +1

      Use "dotnet publish" instead of "dotnet build". "publish" accepts "p:AndroidKeyStore" and doesn't even need the "-c release" parameter ;)

  • @didac3918
    @didac3918 Год назад +1

    After following this tutorial I tried to upload the Signed aab file to google play store, but the play store gives me an error saying :
    You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode.
    I used release in the -c flag of the build command and I also tried to use the publish command instead of the build command, but the play store is giving me the same error. I found some post on StackOverflow saying this has to do with the configuration of your build.gradle, but I don't think you can edit that file in .NET Maui. I get this error if I try create the signed aab file on my local machine as well.

    • @xktsxl3gend
      @xktsxl3gend Год назад

      yes i was able to get around the error

    • @jfversluis
      @jfversluis  Год назад

      How did you fix it?

    • @didac3918
      @didac3918 Год назад +1

      @@jfversluis I was able to fix the error too. I left a reply to my first comment explaining how to fix it, but it got removed somehow. To fix it you have to add a : to the build or publish command.
      So the command is
      dotnet build App/App.csproj -c:Release
      Instead of
      dotnet build App/App.csproj -c Release
      The missing : is not shown in the video and not in the documentation linked in the description, but it is required.

    • @xktsxl3gend
      @xktsxl3gend Год назад

      @@didac3918 yeah sorry was busy with work all day. for me i just switched from using gpg to using a different base64 encode instead

  • @davidkroods811
    @davidkroods811 7 месяцев назад

    Nice guide, thank you

  • @keeganbailey7201
    @keeganbailey7201 10 месяцев назад +1

    It's strange, if I mage a build with GitHub actions and a make a signed build with VS, the SHA1 of the 2 files are different, but they're using the same keystore. Makes it so I can't upload any aab files from Android to the google play store. Quite upsetting.

    • @jfversluis
      @jfversluis  10 месяцев назад

      Why would that be a cause of not being able to the App Store?

    • @keeganbailey7201
      @keeganbailey7201 9 месяцев назад

      @@jfversluisNo idea, if I publish an app using my keystore via VS I can put it in the play store just fine. However, if I build with github actions using the same keystore stored in the secrets via base64 string, it has a different SHA1 signature causing it to get rejected from Google Play. It's very odd.

    • @tommasoscalici
      @tommasoscalici 9 месяцев назад

      @@jfversluis Because the Google Play Console gives this error if you try:
      Your Android App Bundle is signed with the wrong key. Make sure you sign it with the correct signing key and try again. Your App Bundle should be signed with the fingerprint certificate
      SHA1: *something*
      , but the certificate used to sign the uploaded App Bundle has the fingerprint
      SHA1: *something else*
      As you can imagine I've seen this error because I tried too to follow the video but got stuck with app publishing on the store. =(

  • @lebeluet
    @lebeluet 2 года назад +1

    Very informative video. Thanks, you very much.
    For windows, if that's not too much to ask, could you include in your process Certificate (.crt) and private key (.key) converted into pfx file.

    • @jfversluis
      @jfversluis  2 года назад

      Thanks Jean-Marc! I'll try to add the signing for each platform as well for sure!

  • @asMmmaok
    @asMmmaok 7 месяцев назад +1

    First: Thank you for your effort.
    Second: Did you try to actually run the build using your created yml? I think the build would fail. The problem being: dotnet build is not able to access the decrypted keystore file because it's berried somewhere in gpg's directories. So "AndroidSigningKeyStore=myapp.keystore" will never work!
    I've been trying to find a solution that wouldn't drag much changing in the yml but I couldn't find one.
    The yml in the video should yield a:
    `$(AndroidSigningKeyStore)` file `myapp.keystore` could not be found.
    That's what I' getting. Do you have a simple solution for this or is it one of those unsolvable problems?

    • @jfversluis
      @jfversluis  7 месяцев назад

      No problem is unsolvable! And I tested everything that is in my videos. My something changed in the meantime

    • @Al-xe7su
      @Al-xe7su 5 месяцев назад

      @@jfversluis I'm currently facing the same issue.
      error XA4310: `$(AndroidSigningKeyStore)` file `[myapp].keystore` could not be found.
      But the worst part is that it worked few hours ago, and so i have no clue at all how it could have worked and/or why it is no more working.
      Edit: It just worked few minute ago, buy changing this step:
      gpg -d --passphrase "${{ secrets.GPGP }}" --batch myapp.keystore.asc > path_to_csproj_folder/myapp.keystore
      (change=> added: the path_to_csproj when creating myapp.keystore).
      Still, while this make sense, i have no idea how it could have worked once before i completed that path

  •  Год назад +1

    Nice vid thanks Gerald! Do you have one on same topic but on .NET MAUI iOS?

    • @jfversluis
      @jfversluis  Год назад +3

      Hmm looks like I still had to do that one 😬

    •  Год назад

      @@jfversluis would be very much appreciated 😁

  • @MlamuliZondo
    @MlamuliZondo Год назад

    Nice , well explained .

  • @Barkerbg001
    @Barkerbg001 Год назад

    When I upload my app to Google Play it says I have signed a debug build and not a release build (but I have the release tag), any idea what I should do?

    • @jfversluis
      @jfversluis  Год назад

      Make sure you signed the binary with the right keystore!

  • @youngcalabria6227
    @youngcalabria6227 Год назад

    Thank you so much, very informative as always!
    If our GitHub repository is private, do we still need all the GPG and encryption process?

    • @jfversluis
      @jfversluis  Год назад +1

      Thank you! Yes you still do, that is not really for security, but rather a way to transport that data on to the build hosts as GitHub does not have the concept of secure files like Azure DevOps does.

  • @adelmourad8024
    @adelmourad8024 2 года назад

    Thank you

    • @jfversluis
      @jfversluis  2 года назад +1

      You’re very welcome!

  • @ranvirsingh4366
    @ranvirsingh4366 2 года назад

    Hi Gerald - I tried this as well as aab from your repo to upload on to Google Play Store it says "You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode. " I believe we need to pass additional property /p:AndroidKeyStore=True . With this additional parameter it works when I run on local, but for github-action it still failing for me.

    • @jfversluis
      @jfversluis  2 года назад

      Maybe this explains a bit more: ruclips.net/video/jfSVb_RR7X0/видео.html

    • @xktsxl3gend
      @xktsxl3gend 2 года назад

      @@jfversluis i had the same issue. i think it could something wrong with the gpg process because jarsigner has an issue loading the keystore because it thinks its invalid. i verified this locally as well and got the same error as i did on the build machine. however using a raw .keystore file that was not base64 encoded and then decoded works without an issue.

  • @resler7ooo118
    @resler7ooo118 2 года назад

    Hello thanks for tutorial

  • @cissemy
    @cissemy 2 года назад +1

    Great .
    Can you do the same for IOS ?
    Thanks

    • @jfversluis
      @jfversluis  2 года назад +2

      If you watched the video you know the answer 😉

    • @cissemy
      @cissemy 2 года назад

      @@jfversluis
      Thanks

  • @saibitarik2107
    @saibitarik2107 2 года назад

    Hello,
    is there an official date for Xamarin Forms end of support ? is it really one year after MAUI release ? thank you

    • @jfversluis
      @jfversluis  2 года назад

      It's all listed here: dotnet.microsoft.com/en-us/platform/support/policy/xamarin
      The last major version was 5.0 and release January 2021. Support officially ends on January 2023. Closer to that date we will reeavaluate if we might prolong it a little, but don't count on it.

  • @AngeloBestetti
    @AngeloBestetti 2 года назад

    Perfect!!!!!!

    • @jfversluis
      @jfversluis  2 года назад

      Woohoo thank you! The other platforms are coming soon!

  • @olagisrarikis
    @olagisrarikis 2 года назад

    Great tutorial as always! When will we get the same experience in Azure DevOps as we had for publishing Xamarin Forms or is it already there?

    • @jfversluis
      @jfversluis  2 года назад +1

      Thanks so much! You mean with prebuilt tasks? Not sure actually. I think if you copy and paste this YAML it should pretty much work in Azure DevOps as well though :)

  • @alexmidnayt159
    @alexmidnayt159 2 года назад

    What about iOS?

    • @jfversluis
      @jfversluis  2 года назад +1

      I mentioned in the video; it’s coming

    • @alexmidnayt159
      @alexmidnayt159 2 года назад

      @@jfversluis thanks. miss that info. What about Xamain? does Actions will work with Xamarin?