Merge pull request #129 from Haidra-Org/revstar #113
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prepare New Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
version_and_release: | |
runs-on: ubuntu-latest | |
name: Export Software | |
steps: | |
- name: "✔️ Checkout" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: "📣 Release on push" | |
id: release | |
uses: rymndhng/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
bump_version_scheme: norelease | |
use_github_release_notes: true | |
# Always include the checkout step so that | |
# your project is available for Godot to export | |
- name: "✏️ Generate release changelog" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: heinrichreimer/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: "💾 Commit new version" | |
if: ${{ steps.release.outputs.version != '' }} | |
run: | | |
sed -i 's/VERSION := ".*"/VERSION := "${{ steps.release.outputs.version }}"/g' ./Consts.gd | |
sed -i 's/application\/file_version=".*"/application\/file_version="${{ steps.release.outputs.version }}"/g' ./export_presets.cfg | |
sed -i 's/application\/product_version=".*"/application\/product_version="${{ steps.release.outputs.version }}"/g' ./export_presets.cfg | |
sed -i 's/# Lucid-Creations \[.*\]/# Lucid-Creations [${{ steps.release.outputs.version }}]/g' README.md | |
git config user.email [email protected] | |
git config user.name github-actions | |
git commit -am 'version incremented' | |
git push | |
- name: "🤖 Export game" | |
id: export | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: firebelley/[email protected] | |
with: | |
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.5/Godot_v3.5-stable_linux_headless.64.zip | |
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.5/Godot_v3.5-stable_export_templates.tpz | |
relative_project_path: ./ | |
base_version: "${{ steps.release.outputs.version }}" | |
create_release: false | |
archive_output: true | |
export_debug: false | |
- name: "🛠 Prepare files for publishing" | |
if: ${{ steps.release.outputs.version != '' }} | |
shell: bash | |
run: | | |
mkdir -p build/StandaloneWindows64 | |
mkdir -p build/StandaloneLinux64 | |
cp '${{ steps.export.outputs.archive_directory }}/lucid-creations-windows.zip' . | |
unzip lucid-creations-windows.zip -d build/StandaloneWindows64 | |
cp '${{ steps.export.outputs.archive_directory }}/lucid-creations-linux.zip' . | |
unzip lucid-creations-linux.zip -d build/StandaloneLinux64 | |
cp '${{ steps.export.outputs.archive_directory }}/lucid-creations-macosx.zip' . | |
cp '${{ steps.export.outputs.archive_directory }}/HTML5.zip' . | |
ls -larth | |
ls -larth ${{ steps.export.outputs.archive_directory }} | |
ls -larth build | |
ls -larth build/* | |
- name: "☢ Upload Windows version to itch.io" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: "${{ secrets.BUTLER_CREDENTIALS }}" | |
CHANNEL: windows | |
ITCH_GAME: lucid-creations | |
ITCH_USER: dbzer0 | |
PACKAGE: lucid-creations-windows.zip | |
VERSION: "${{ steps.release.outputs.version }}" | |
- name: "🐧 Upload Linux version to itch.io" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: linux | |
ITCH_GAME: lucid-creations | |
ITCH_USER: dbzer0 | |
PACKAGE: lucid-creations-linux.zip | |
VERSION: "${{ steps.release.outputs.version }}" | |
- name: "☣ Upload OSX version to itch.io" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} | |
CHANNEL: osx | |
ITCH_GAME: lucid-creations | |
ITCH_USER: dbzer0 | |
PACKAGE: lucid-creations-macosx.zip | |
VERSION: "${{ steps.release.outputs.version }}" | |
- name: "🚀 Upload HTML5 version to itch.io" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: josephbmanley/butler-publish-itchio-action@master | |
env: | |
BUTLER_CREDENTIALS: "${{ secrets.BUTLER_CREDENTIALS }}" | |
CHANNEL: HTML5 | |
ITCH_GAME: lucid-creations | |
ITCH_USER: dbzer0 | |
PACKAGE: HTML5.zip | |
VERSION: "${{ steps.release.outputs.version }}" | |
# - name: "🔧 Publish all versions with Steamworks" | |
# if: ${{ steps.release.outputs.version != '' }} | |
# uses: game-ci/steam-deploy@v1 | |
# with: | |
# username: ${{ secrets.STEAM_USERNAME }} | |
# password: ${{ secrets.STEAM_PASSWORD }} | |
# configVdf: ${{ secrets.STEAM_CONFIG_VDF}} | |
# ssfnFileName: ${{ secrets.STEAM_SSFN_FILE_NAME }} | |
# ssfnFileContents: ${{ secrets.STEAM_SSFN_FILE_CONTENTS }} | |
# appId: 2197290 | |
# buildDescription: "${{ steps.release.outputs.version }}" | |
# # buildDescription: "${{ steps.release.outputs.version }}" | |
# rootPath: build | |
# depot1Path: StandaloneLinux64 | |
# depot2Path: StandaloneWindows64 | |
# releaseBranch: prerelease | |
- name: "Inform with Discord Webhook" | |
if: ${{ steps.release.outputs.version != '' }} | |
uses: tsickert/[email protected] | |
with: | |
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
content: "New version of Lucid Creations has been published: https://github.com/Haidra-Org/Lucid-Creations/releases/tag/${{ steps.release.outputs.version }}" |