bscotch / igor-setup

A GitHub Action to set up Igor to allow Building via Command Line for GameMaker projects.
MIT License
3 stars 1 forks source link

Android build asks me for a licence.plist file #4

Open BrunoDG opened 3 days ago

BrunoDG commented 3 days ago

Hey guys, I've been following a tutorial on https://gamemaker.io/en/blog/bs-tech-automate-builds to create automatic builds on Android, that should be working. But when I try to run, the following message pops up on my igor-setup workflow's step:

Error

Run bscotch/igor-setup@v1
Inferring runtime from target-yyp: /home/runner/work/build-test/build-test/Survivor Game - Build Test.yyp
Using local settings file: /home/runner/work/build-test/build-test/local_settings.json
Release build
System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.HttpWebRequest.GetResponse()
   at System.Net.WebClient.GetWebResponse(WebRequest request)
   at System.Net.WebClient.DownloadBits(WebRequest request, Stream writeStream)
   at System.Net.WebClient.UploadBits(WebRequest request, Stream readStream, Byte[] buffer, Int32 chunkSize, Byte[] header, Byte[] footer)
   at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
   at System.Net.WebClient.UploadString(Uri address, String method, String data)
   at System.Net.WebClient.UploadString(String address, String method, String data)
   at Igor.RuntimeBuilder.FetchLicense()
Igor complete.
Error: ENOENT: no such file or directory, open '/home/runner/work/_actions/bscotch/igor-setup/v1/dist/gm-sandbox/gm-user/tempUser/licence.plist'

I tried looking at other places like forums and such, but no one seems to have that issue.

How to reproduce the following error

Use the following job:

  build-android:
    runs-on: ubuntu-latest
    steps:
      # Check out the repository with the GameMaker project
      - uses: actions/checkout@v4
        with:
          lfs: true
      # This step finds the yyp file in the repository and saves the path to an output
      - id: find_yyp
        name: Find the yyp file
        run: |
          yyp=$(find ${{ github.workspace }} -name "*.yyp")
          echo "YYP file found at: $yyp"
          echo "yyp-path=$yyp" >> $GITHUB_OUTPUT
      #region Android setup
      - name: Create the keystore file from secrets
        id: write_file
        uses: timheuer/base64-to-file@v1.2
        with:
          fileName: 'myTemporaryFile.keystore'
          encodedString: ${{ secrets.KEYSTORE }}
      - name: Create the local-settings-override-file for igor-setup
        run: |
          echo '{
          "machine.Platform Settings.Android.Keystore.filename": "${{ steps.write_file.outputs.filePath }}", 
          "machine.Platform Settings.Android.Keystore.keystore_password": "${{ secrets.SIGNING_KEY_PASSWORD }}", 
          "machine.Platform Settings.Android.Keystore.keystore_alias_password": "${{ secrets.SIGNING_STORE_PASSWORD }}", 
          "machine.Platform Settings.Android.Keystore.alias": "${{ secrets.SIGNING_KEY_ALIAS }}"
          }' \
          > local_settings.json
      - name: Set up ffmpeg # This step may be removed when https://github.com/YoYoGames/GameMaker-Bugs/issues/4977 is fixed
        uses: FedericoCarboni/setup-ffmpeg@v3
        with:
          ffmpeg-version: '6.1.0'
      - name: Set Up Android SDK platform-tools # The default Android SDK does not include platform-tools and its component `adb`, which is required by Igor for the Android build
        run: |
          ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \
          --sdk_root=$ANDROID_SDK_ROOT \
          "platform-tools"
      #endregion
      # This step sets up the GameMaker build CLI tool Igor https://github.com/bscotch/igor-setup
      - name: use Igor Setup
        uses: bscotch/igor-setup@v1
        id: igor
        with:
          local-settings-override-file: ${{ github.workspace }}/local_settings.json
          target-yyp: ${{ steps.find_yyp.outputs.yyp-path }}
          access-key: ${{ secrets.GSA_ACCESS_KEY }} 

      # This step uses Igor to build the GameMaker project https://github.com/bscotch/igor-build
      - name: use Igor build
        uses: bscotch/igor-build@v1
        id: build
        with:
          yyp-path: ${{ steps.find_yyp.outputs.yyp-path }}
          user-dir: ${{ steps.igor.outputs.user-dir }}
      - name: upload build as artifact
        uses: actions/upload-artifact@v4
        with:
          name: android-build-${{ needs.define-vars.outputs.VRS }}.zip
          path: ${{ steps.build.outputs.out-dir }}
          retention-days: 1

At use Igor Setup step, it gives the licence.plist error. But there's no definition to create that file or folder. Although on a Windows instance it runs properly. Is there a bug with the Ubuntu folder?

shichen85 commented 3 days ago

The 404 error indicates that when running igor runtime FetchLicense, Igor could not fetch the license from GameMaker's server. It could mean that your access key does not have license to the Android export or the Ubuntu Igor. If you have a Ubuntu machine, you can try running igor runtime FetchLicense there with your access key to see if it can successfully generate the license file. If not, you will want to sort that out with the GameMaker customer support.

For igor runtime FetchLicense, see https://manual.gamemaker.io/monthly/en/#t=Settings%2FBuilding_via_Command_Line.htm

BrunoDG commented 2 days ago

I think I solved this issue. Just redid the workflow and it worked well. Didn't understand yet what happened, but ok.

Now, I'm with another issue, but I don't know if it's correct to include it in here or if should I open another issue as question:

I've included the Temurin JDK as version 21, but it keeps telling me that my build.gradle is at version 11. The problem is that, I've included the new JAVA_HOME variable to redirect to version 21, although it keeps telling me that the version hasn't changed. How can I change the build.gradle file since it's not included on my gamemaker config?