Skip to content

Commit 129e5b6

Browse files
committed
Initial commit
0 parents  commit 129e5b6

24 files changed

Lines changed: 197 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: ./
13+
with:
14+
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
15+
gameData: ./testBuild
16+
itchUsername: ${{ secrets.ITCH_USERNAME }}
17+
itchGameId: ${{ secrets.ITCH_GAME_ID }}
18+
buildChannel: "html5"
19+

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM ghcr.io/kikimoragames/butler:latest
2+
3+
COPY entrypoint.sh /entrypoint.sh
4+
RUN chmod +x entrypoint.sh
5+
6+
ENTRYPOINT ["/entrypoint.sh"]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Kikimora Games
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Itch.io - Publish GitHub Action

action.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Itch.io - Publish"
2+
description: "Publish releases to Itch.io"
3+
author: KikimoraGames
4+
runs:
5+
using: docker
6+
image: Dockerfile
7+
branding:
8+
icon: upload-cloud
9+
color: red
10+
inputs:
11+
butlerApiKey:
12+
description: 'Butler API Key'
13+
required: true
14+
gameData:
15+
description: 'Directory or .zip file of the game data. Zip files are slower to upload.'
16+
required: true
17+
itchUsername:
18+
description: 'Itch.io username of the game owner. e.g. in finji/overland this would be finji.'
19+
required: true
20+
itchGameId:
21+
description: "Itch.io id of the game. e.g. in finji/overland this would be overland."
22+
required: true
23+
buildChannel:
24+
description: "Channel name of the game: https://itch.io/docs/butler/pushing.html#channel-names"
25+
required: true
26+
buildNumber:
27+
description: "Optional build number, use to supply your own build version instead of using itch's versioning"
28+
required: false
29+
buildNumberFile:
30+
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."
31+
required: false

entrypoint.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
set -e
3+
4+
export BUTLER_API_KEY=$INPUT_BUTLERAPIKEY
5+
6+
if [ -z "$BUTLER_API_KEY" ] ; then
7+
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."
8+
exit 1
9+
fi
10+
11+
src=$INPUT_GAMEDATA
12+
itchUsername=$INPUT_ITCHUSERNAME
13+
itchGameId=$INPUT_ITCHGAMEID
14+
buildChannel=$INPUT_BUILDCHANNEL
15+
16+
flags=""
17+
18+
if [ ! -z "$INPUT_BUILDNUMBER" ]
19+
then
20+
flags="${flags} --userversion ${INPUT_BUILDNUMBER}"
21+
elif [ ! -z "$INPUT_BUILDNUMBERFILE" ]
22+
then
23+
flags="${flags} --userversion-file ${INPUT_BUILDNUMBERFILE}"
24+
fi
25+
26+
butler push "${src}" $itchUsername/$itchGameId:$buildChannel $flags

testBuild/Build/Build.data

5.09 MB
Binary file not shown.

testBuild/Build/Build.data.gz

833 KB
Binary file not shown.

testBuild/Build/Build.framework.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
82 KB
Binary file not shown.

0 commit comments

Comments
 (0)