pd-rs / get-playdate-sdk

Derives Playdate SDK
MIT License
22 stars 3 forks source link
action game-development playdate playdate-sdk sdk

Playdate Get Playdate SDK

This GitHub Action delivers specified Playdate SDK.

Also installs arm-gcc gnu toolchain.

Parameters

Supported platforms

Usage Example

- name: Install Playdate SDK
  id: playdate
  uses: pd-rs/get-playdate-sdk@0.4
  with:
    version: 2.5.0 # possible values: version `x.x.x` or `latest` by default

- name: usage
  run: |
    echo "SDK path env: $PLAYDATE_SDK_PATH"
    echo "SDK root out: ${{ steps.playdate.outputs.root }}"
    echo "SDK version: ${{ steps.playdate.outputs.version }}"
    pdc --version # because SDK/bin already in PATH

Windows and Powershell

Note that $PLAYDATE_SDK_PATH and outputs.root are set in POSIX format. If you want to use it in powershell you should fix it using one of following solutions:

  1. enable root-win-path (see inputs)
  2. fix the env for powershell from bash with:
    - if: runner.os == 'Windows'
    shell: bash
    run: |
      PLAYDATE_SDK_PATH=$(cygpath -w "$PLAYDATE_SDK_PATH")
      echo "PLAYDATE_SDK_PATH=$PLAYDATE_SDK_PATH" >> $GITHUB_ENV

    So you'll get fixed $PLAYDATE_SDK_PATH for powershell and normal outputs.root in POSIX

  3. enable root-win-path (see inputs) and fix the env for powershell from bash with:

    - name: Install Playdate SDK
     id: playdate
     uses: pd-rs/get-playdate-sdk@0.4
     with:
       root-win-path: true
    
    - run: echo "PLAYDATE_SDK_PATH=$PLAYDATE_SDK_PATH" >> $GITHUB_ENV
     env: PLAYDATE_SDK_PATH: ${{ steps.playdate.outputs.root }}
     if: runner.os == 'Windows'
     shell: bash
    

    So you'll get both paths fixed for powershell - $PLAYDATE_SDK_PATH and outputs.root.