Skip to content

Release Windows x64 Version to itch.io #11

Release Windows x64 Version to itch.io

Release Windows x64 Version to itch.io #11

name: Release Windows x64 Version to itch.io
on:
workflow_dispatch:
inputs:
git-tag:
description: 'The git tag which which is used for the release'
required: true
default: 1.0.0
jobs:
release-windows_x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- name: Fetch Git Tags
run: git fetch --all --tags --prune
- name: Git Checkout Tag
run: git checkout tags/${{github.event.inputs.git-tag}} -b release/${{github.event.inputs.git-tag}}
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Maven Build
run: mvn clean install -Pnative
- name: Download itch.io Butler
run: curl -L -o butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
- name: Unzip itch.io Butler
run: unzip butler.zip
- name: Make Executable
run: chmod +x butler
- name: list directory
run: dir
- name: Create release Folder
run: mkdir nibbles-clone-v${{github.event.inputs.git-tag}}
- name: Copy Assets to release Folder
run: Copy-Item -Path "D:\a\nibbles-clone\nibbles-clone\data\*" -Destination "D:\a\nibbles-clone\nibbles-clone\nibbles-clone-v${{github.event.inputs.git-tag}}" -Recurse
- name: Copy Binaries to release Folder
run: Copy-Item "D:\a\nibbles-clone\nibbles-clone\target\nibbles-clone.exe" -Destination "D:\a\nibbles-clone\nibbles-clone\nibbles-clone-v${{github.event.inputs.git-tag}}"
- name: Zip release folder
run: Compress-Archive -Path "D:\a\nibbles-clone\nibbles-clone\nibbles-clone-v${{github.event.inputs.git-tag}}" -Destination "D:\a\nibbles-clone\nibbles-clone\nipples-clone-v${{github.event.inputs.git-tag}}.zip"
- name: Deploy to itch.io
env:
BUTLER_API_KEY: ${{secrets.BUTLER_API_KEY}}
run: butler.exe push nipples-clone-v${{github.event.inputs.git-tag}}.zip mwttg/nibbles-clone:win --userversion ${{github.event.inputs.git-tag}}