Skip to content

Added github workflow and added nightly build plus pre-release #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bladeoner
Copy link
Contributor

@bladeoner bladeoner commented Feb 12, 2025

Hi @cgutman,

I have added the following, which I think will help to collect feedback before releasing a new version:

  • A Github CI workflow to build the debug apk's for root and nonRoot.

Important notice: It generates a "debug keystore" everytime the pipeline runs, to always use the same "debug keystore" you can use the following command from a machine with Android Studio: base64 --wrap=0 .android/debug.keystore > encodedData.txt

After that you can add it under "Settings" of the repository, click on "Secrets and Variables" under "Security", click on "Actions" and click on "New repository secret". The name should be "DEBUG_KEYSTORE" and the value retrieved with the command.
image. This will ensure users are able to upgrade to a newer version of a debug client, because the debug signing key will be the same.

  • Added a pre-release, which will release automatically after a PR has been merged to main. The apk debug files will contain the commit sha in the filenames and only the files of the last commit will be available.
    image
  • Added a nightly builds section for root and nonRoot in the README, which looks like the following
    image

@bladeoner
Copy link
Contributor Author

Hi @ReenigneArcher could you look at this PR please?

I think it can help the community to create a debug version for testing and troubleshooting purposes.

@ReenigneArcher
Copy link
Contributor

@bladeoner Yes, I can take a closer look at it tonight. At a first glance I would suggest adding workflow concurrency (there are a lot of examples in LizardByte/Sunshine workflows) which will cancel in process workflows when a PR is pushed to multiple times in quick succession.

Note: I am not a Moonlight maintainer but I'm definitely glad to help out and get a pre-review done for cgutman.

@bladeoner
Copy link
Contributor Author

Thanks in advance.

Copy link
Contributor

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not actually tested this, but overall it seems pretty decent to me. I do have a few suggestions though.

One global suggestion is to further indent the steps by 2 additional spaces.

e.g.

    steps:
    - uses: android-actions/setup-android@v3
      with:
        cmdline-tools-version: 9477386

To become:

    steps:
      - uses: android-actions/setup-android@v3
        with:
          cmdline-tools-version: 9477386

Also, can the appveyor build be removed if this is added?

@bladeoner
Copy link
Contributor Author

bladeoner commented Feb 20, 2025

I have not actually tested this, but overall it seems pretty decent to me. I do have a few suggestions though.

One global suggestion is to further indent the steps by 2 additional spaces.

e.g.

    steps:
    - uses: android-actions/setup-android@v3
      with:
        cmdline-tools-version: 9477386

To become:

    steps:
      - uses: android-actions/setup-android@v3
        with:
          cmdline-tools-version: 9477386

Also, can the appveyor build be removed if this is added?

Hi @ReenigneArcher, thank you for reviewing the code. I have applied the suggested changes.

If we implement this, I think we don't need appveyor anymore because this will do the check when a PR has been opened, but that's up to @cgutman to keep it in place or remove it at a later stage.

Successful pipeline run: https://github.com/bladeoner/moonlight-android/actions/runs/13430345240

Copy link
Contributor

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve, but leaving a few notes for @cgutman

TODO:

  • add/update branch protection rules for PRs if desirable
  • determine if appveyor build is still needed/desirable, seems redundant to me
  • determine events to trigger a release... workflow currently uses any push to master... could be on tag event or whatever you like
  • maybe automate publishing to app stores?

name: Release
runs-on: ubuntu-latest
needs: [build]
if: github.ref == 'refs/heads/master'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBD: What event is desirable to trigger the release? This logic will be for every merge (similar to what I do in Sunshine)


- name: Decode debug keystore
env:
DEBUG_KEYSTORE: ${{ secrets.DEBUG_KEYSTORE }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: add secret value to repo

NOTE: secrets are never available to PRs from forks as they can only access secrets in their own repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants