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: on:
workflow_call: workflow_call:
inputs: inputs:
PUBLISH:
required: true
ITCH_USERNAME:
required: false
ITCH_GAME_ID:
required: false
secrets: secrets:
BUTLER_API_KEY:
required: false
PIPELINE_WORKER_SSH_KEY: PIPELINE_WORKER_SSH_KEY:
required: true required: true
PIPELINE_WORKER_KNOWN_HOSTS: PIPELINE_WORKER_KNOWN_HOSTS:
@ -12,7 +20,7 @@ on:
required: true required: true
jobs: jobs:
Package: package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: apt-get update - run: apt-get update
@ -37,9 +45,37 @@ jobs:
name: "${{ github.event.repository.name }}.love" name: "${{ github.event.repository.name }}.love"
path: "${{ github.workspace }}/bin/*.love" path: "${{ github.workspace }}/bin/*.love"
if-no-files-found: error if-no-files-found: error
- name: Uploading artifacts (win64) # TODO: Fix
uses: actions/upload-artifact@v3 # - 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: with:
name: "${{ github.event.repository.name }}-win64.zip" name: ${{ matrix.channel }}
path: "${{ github.workspace }}/bin/*-win64.zip" path: build/${{ matrix.channel }}
if-no-files-found: error - 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