Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOrioli committed Sep 6, 2020
0 parents commit 129e5b6
Show file tree
Hide file tree
Showing 24 changed files with 197 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./
with:
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
gameData: ./testBuild
itchUsername: ${{ secrets.ITCH_USERNAME }}
itchGameId: ${{ secrets.ITCH_GAME_ID }}
buildChannel: "html5"

6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ghcr.io/kikimoragames/butler:latest

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Kikimora Games

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Itch.io - Publish GitHub Action
31 changes: 31 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Itch.io - Publish"
description: "Publish releases to Itch.io"
author: KikimoraGames
runs:
using: docker
image: Dockerfile
branding:
icon: upload-cloud
color: red
inputs:
butlerApiKey:
description: 'Butler API Key'
required: true
gameData:
description: 'Directory or .zip file of the game data. Zip files are slower to upload.'
required: true
itchUsername:
description: 'Itch.io username of the game owner. e.g. in finji/overland this would be finji.'
required: true
itchGameId:
description: "Itch.io id of the game. e.g. in finji/overland this would be overland."
required: true
buildChannel:
description: "Channel name of the game: https://itch.io/docs/butler/pushing.html#channel-names"
required: true
buildNumber:
description: "Optional build number, use to supply your own build version instead of using itch's versioning"
required: false
buildNumberFile:
description: "Optional build number file path, use to supply your own build version instead of using itch's versioning. The file should contain a single line with the version or build number, in UTF-8 without BOM."
required: false
26 changes: 26 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
set -e

export BUTLER_API_KEY=$INPUT_BUTLERAPIKEY

if [ -z "$BUTLER_API_KEY" ] ; then
echo "BUTLER_API_KEY not set. Follow instructions on https://itch.io/docs/butler/login.html#running-butler-from-ci-builds-travis-ci-gitlab-ci-etc to get your key."
exit 1
fi

src=$INPUT_GAMEDATA
itchUsername=$INPUT_ITCHUSERNAME
itchGameId=$INPUT_ITCHGAMEID
buildChannel=$INPUT_BUILDCHANNEL

flags=""

if [ ! -z "$INPUT_BUILDNUMBER" ]
then
flags="${flags} --userversion ${INPUT_BUILDNUMBER}"
elif [ ! -z "$INPUT_BUILDNUMBERFILE" ]
then
flags="${flags} --userversion-file ${INPUT_BUILDNUMBERFILE}"
fi

butler push "${src}" $itchUsername/$itchGameId:$buildChannel $flags
Binary file added testBuild/Build/Build.data
Binary file not shown.
Binary file added testBuild/Build/Build.data.gz
Binary file not shown.
7 changes: 7 additions & 0 deletions testBuild/Build/Build.framework.js

Large diffs are not rendered by default.

Binary file added testBuild/Build/Build.framework.js.gz
Binary file not shown.
1 change: 1 addition & 0 deletions testBuild/Build/Build.loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added testBuild/Build/Build.wasm
Binary file not shown.
Binary file added testBuild/Build/Build.wasm.gz
Binary file not shown.
Binary file added testBuild/TemplateData/favicon.ico
Binary file not shown.
Binary file added testBuild/TemplateData/fullscreen-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testBuild/TemplateData/progress-bar-empty-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testBuild/TemplateData/progress-bar-empty-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testBuild/TemplateData/progress-bar-full-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added testBuild/TemplateData/progress-bar-full-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 129e5b6

Please sign in to comment.