6
0

Integrate publish into build

This commit is contained in:
Jon Michael Aanes 2023-11-09 00:39:48 +01:00
parent 79d0c93ffa
commit 6aa6d997bd
2 changed files with 43 additions and 46 deletions

View File

@ -1,39 +0,0 @@
name: LÖVE Game - Publish
on:
workflow_call:
inputs:
ITCH_USERNAME:
required: true
ITCH_GAME_ID:
required: true
secrets:
BUTLER_API_KEY:
required: true
jobs:
Deploy:
name: Upload to Itch
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
channel: # TODO
- win64
- love
name: Deploy - Itch.io ${{ matrix.template }}
steps:
- uses: actions/download-artifact@v3
with:
name: ${{ matrix.channel }}
path: build/${{ matrix.channel }}
- uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
gameData: ./build/${{ matrix.template }}
itchUsername: ${{ inputs.ITCH_USERNAME }}
itchGameId: ${{ inputs.ITCH_GAME_ID }}
buildChannel: ${{ matrix.channel }}
buildNumber: ${{ needs.version.outputs.version_hash }} # TODO

View File

@ -1,9 +1,17 @@
name: LÖVE Game - Build
name: LÖVE Game
on:
workflow_call:
inputs:
PUBLISH:
required: true
ITCH_USERNAME:
required: false
ITCH_GAME_ID:
required: false
secrets:
BUTLER_API_KEY:
required: false
PIPELINE_WORKER_SSH_KEY:
required: true
PIPELINE_WORKER_KNOWN_HOSTS:
@ -12,7 +20,7 @@ on:
required: true
jobs:
Package:
package:
runs-on: ubuntu-latest
steps:
- run: apt-get update
@ -37,9 +45,37 @@ jobs:
name: "${{ github.event.repository.name }}.love"
path: "${{ github.workspace }}/bin/*.love"
if-no-files-found: error
- name: Uploading artifacts (win64)
uses: actions/upload-artifact@v3
# TODO: Fix
# - name: Uploading artifacts (win64)
# uses: actions/upload-artifact@v3
# with:
# name: "${{ github.event.repository.name }}-win64.zip"
# path: "${{ github.workspace }}/bin/*-win64.zip"
# if-no-files-found: error
deploy:
name: Upload to Itch
runs-on: ubuntu-latest
needs: [package]
if: ${{ input.PUBLISH }}
strategy:
fail-fast: true
matrix:
channel: # TODO
- love
#- win64 # TODO
name: Deploy - Itch.io ${{ matrix.template }}
steps:
- uses: actions/download-artifact@v3
with:
name: "${{ github.event.repository.name }}-win64.zip"
path: "${{ github.workspace }}/bin/*-win64.zip"
if-no-files-found: error
name: ${{ matrix.channel }}
path: build/${{ matrix.channel }}
- uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
gameData: ./build/${{ matrix.template }}
itchUsername: ${{ inputs.ITCH_USERNAME }}
itchGameId: ${{ inputs.ITCH_GAME_ID }}
buildChannel: ${{ matrix.channel }}
buildNumber: ${{ needs.version.outputs.version_hash }} # TODO