Publish Release → itch.io/Google Play #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Release → itch.io | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| upload_to_itch: | |
| # skip prereleases – remove the line below if you want them as well | |
| if: ${{ github.event.release.prerelease == false }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download release assets | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| mkdir -p dist | |
| gh release download ${{ github.event.release.tag_name }} \ | |
| -R ${{ github.repository }} \ | |
| -D dist | |
| - name: List downloaded assets | |
| run: | | |
| echo "Contents of dist directory:" | |
| ls -R dist | |
| - name: Write Google Play service account | |
| env: | |
| GOOGLE_PLAY_JSON: ${{ secrets.GOOGLE_PLAY_JSON }} | |
| run: echo "$GOOGLE_PLAY_JSON" > $HOME/google-play-service-account.json | |
| - name: Set up Ruby & Fastlane | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.1' | |
| - name: Deploy to Google Play (internal track) | |
| env: | |
| APK_PATH: dist/fugitive-android.apk | |
| run: fastlane android deploy | |
| - name: Set up Butler | |
| uses: jdno/setup-butler@v1 | |
| - name: Push every build to itch.io | |
| env: | |
| BUTLER_API_KEY: ${{ secrets.ITCH_API_KEY }} | |
| run: | | |
| butler push dist/fugitive-windows.zip stumpy-dog-studios/fugitive:windows-release --userversion ${{ github.event.release.tag_name }} | |
| butler push dist/fugitive-linux.zip stumpy-dog-studios/fugitive:linux-release --userversion ${{ github.event.release.tag_name }} | |
| butler push dist/fugitive-osx.zip stumpy-dog-studios/fugitive:osx-release --userversion ${{ github.event.release.tag_name }} | |
| butler push dist/fugitive-android.apk stumpy-dog-studios/fugitive:android-release --userversion ${{ github.event.release.tag_name }} |