133 lines
4.1 KiB
YAML
133 lines
4.1 KiB
YAML
name: LÖVE Game
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
VERSION:
|
|
required: true
|
|
ITCH_USERNAME:
|
|
required: false
|
|
ITCH_GAME_ID:
|
|
required: false
|
|
STEAM_APP_ID:
|
|
required: false
|
|
STEAM_RELEASE_BRANCH:
|
|
required: false
|
|
secrets:
|
|
PIPELINE_WORKER_SSH_KEY:
|
|
type: string
|
|
required: true
|
|
PIPELINE_WORKER_KNOWN_HOSTS:
|
|
type: string
|
|
required: true
|
|
PIPELINE_WORKER_USERNAME:
|
|
type: string
|
|
required: true
|
|
BUTLER_API_KEY:
|
|
type: string
|
|
required: false
|
|
STEAM_USERNAME:
|
|
type: string
|
|
required: false
|
|
STEAM_CONFIG_VDF:
|
|
type: string
|
|
required: false
|
|
|
|
jobs:
|
|
package:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: apt-get update
|
|
- run: apt-get install -y fish luajit optipng ffmpeg zip rsync
|
|
- name: Setting up SSH
|
|
uses: https://github.com/shimataro/ssh-key-action@v2.5.1
|
|
with:
|
|
key: ${{ secrets.PIPELINE_WORKER_SSH_KEY }}
|
|
name: id_rsa
|
|
known_hosts: ${{ secrets.PIPELINE_WORKER_KNOWN_HOSTS }}
|
|
config: |
|
|
Host gitfub
|
|
HostName gitfub.space
|
|
User ${{ secrets.PIPELINE_WORKER_USERNAME }}
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
|
|
# Create artifacts
|
|
|
|
- name: Creating binaries
|
|
run: fish ${{ github.workspace }}/assemble release
|
|
|
|
# Upload produced artifacts
|
|
|
|
- name: Uploading artifacts (love)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
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
|
|
with:
|
|
name: "${{ github.event.repository.name }}-win64.zip"
|
|
path: "${{ github.workspace }}/bin/*-win64.zip"
|
|
if-no-files-found: error
|
|
- name: Uploading artifacts (macos)
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: "${{ github.event.repository.name }}-macos.zip"
|
|
path: "${{ github.workspace }}/bin/*-macos.zip"
|
|
if-no-files-found: error
|
|
|
|
# Determine files
|
|
|
|
- name: Looking for love
|
|
id: findfiles
|
|
run: |
|
|
echo "love="$(ls bin/*.love) >> "$GITHUB_OUTPUT"
|
|
echo "win64="$(ls bin/*-win64.zip) >> "$GITHUB_OUTPUT"
|
|
echo "macos="$(ls bin/*-macos.zip) >> "$GITHUB_OUTPUT"
|
|
|
|
# Upload to itch
|
|
|
|
- uses: KikimoraGames/itch-publish@v0.0.3
|
|
if: always() && github.event_name == 'release' && inputs.ITCH_GAME_ID
|
|
with:
|
|
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
|
|
gameData: ${{ steps.findfiles.outputs.love }}
|
|
itchUsername: ${{ inputs.ITCH_USERNAME }}
|
|
itchGameId: ${{ inputs.ITCH_GAME_ID }}
|
|
buildChannel: love-linux
|
|
|
|
- uses: KikimoraGames/itch-publish@v0.0.3
|
|
if: always() && github.event_name == 'release' && inputs.ITCH_GAME_ID
|
|
with:
|
|
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
|
|
gameData: ${{ steps.findfiles.outputs.win64 }}
|
|
itchUsername: ${{ inputs.ITCH_USERNAME }}
|
|
itchGameId: ${{ inputs.ITCH_GAME_ID }}
|
|
buildChannel: win64
|
|
|
|
- uses: KikimoraGames/itch-publish@v0.0.3
|
|
if: always() && github.event_name == 'release' && inputs.ITCH_GAME_ID
|
|
with:
|
|
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
|
|
gameData: ${{ steps.findfiles.outputs.macos }}
|
|
itchUsername: ${{ inputs.ITCH_USERNAME }}
|
|
itchGameId: ${{ inputs.ITCH_GAME_ID }}
|
|
buildChannel: mac
|
|
|
|
# Upload to steam
|
|
|
|
- uses: game-ci/steam-deploy@v3
|
|
if: always() && github.event_name == 'release' && inputs.STEAM_APP_ID
|
|
with:
|
|
username: ${{ secrets.STEAM_USERNAME }}
|
|
configVdf: ${{ secrets.STEAM_CONFIG_VDF }}
|
|
appId: ${{ inputs.STEAM_APP_ID }}
|
|
buildDescription: ${{ inputs.VERSION }}
|
|
rootPath: bin
|
|
#depot1Path: StandaloneWindows64
|
|
depot2Path: build-win64
|
|
releaseBranch: ${{ secrets.STEAM_RELEASE_BRANCH }}
|
|
|