Skip to content

Add instructions for releasing a new version #260

Add instructions for releasing a new version

Add instructions for releasing a new version #260

Workflow file for this run

env:
GODOT_VERSION: "4.3"
GODOT_BUILD: "stable"
on:
push:
branches:
- "*"
tags:
- "*"
jobs:
release:
name: Export and publish game
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Unlock secrets
uses: sliteteam/[email protected]
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
# There's no simple way to install the android build template in CI atm.
# It's important that the AAB preset is the last one in the file
# because godot expects a continous sequence of preset indexes.
- name: Delete AAB export preset
run: |
sed -i '/^\[preset.5\]/,/${Final}/{/${Final}/!d}' export_presets.cfg
- name: export game
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/Godot_v${{ env.GODOT_VERSION }}-${{ env.GODOT_BUILD }}_linux.x86_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/${{ env.GODOT_VERSION }}/Godot_v${{ env.GODOT_VERSION }}-${{ env.GODOT_BUILD }}_export_templates.tpz
relative_project_path: ./
use_preset_export_path: true
use_godot_4: true
archive_output: true
- name: Check that build was successful
run: |
tree export
[[ -f "export/android/Android apk.zip" ]] || (echo "android build not found"; exit 1)
[[ -f export/linux/LinuxX11.zip ]] || (echo "linux build not found"; exit 1)
[[ -f export/osx/OSX.zip ]] || (echo "osx build not found"; exit 1)
[[ -f export/web/Web.zip ]] || (echo "web build not found"; exit 1)
[[ -f "export/windows/Windows Desktop.zip" ]] || (echo "windows build not found"; exit 1)
- name: Unzip web build for netlify
working-directory: export/web
run: |
unzip Web.zip -d Web
tree .
- name: Publish to Netlify Preview
run: |
npx netlify deploy --dir=export/web/Web
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# ---- Commands below run for released versions only
- name: get tag from version
id: tag_version
run: |
echo "TAG_VERSION=$GITHUB_REF_NAME" >> $GITHUB_OUTPUT
- name: Upload macOs build to release
uses: svenstaro/upload-release-action@v2
with:
file: "export/osx/OSX.zip"
asset_name: knakk-osx.zip
overwrite: true
if: github.ref_type == 'tag'
- name: Upload linux build to release
uses: svenstaro/upload-release-action@v2
with:
file: export/linux/LinuxX11.zip
asset_name: knakk-linux.zip
overwrite: true
if: github.ref_type == 'tag'
- name: Upload windows build to release
uses: svenstaro/upload-release-action@v2
with:
file: "export/windows/Windows Desktop.zip"
asset_name: knakk-windows.zip
overwrite: true
if: github.ref_type == 'tag'
- name: Upload android build to release
uses: svenstaro/upload-release-action@v2
with:
file: "export/android/Android apk.zip"
asset_name: knakk-android.zip
overwrite: true
if: github.ref_type == 'tag'
- name: Upload web build to release
uses: svenstaro/upload-release-action@v2
with:
file: "export/web/Web.zip"
asset_name: knakk-web.zip
overwrite: true
if: github.ref_type == 'tag'
- name: Publish to Netlify Production
run: |
npx netlify deploy --dir=export/web/Web --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
if: github.ref_type == 'tag'
- name: Upload android build to itch.io
uses: yeslayla/[email protected]
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: android
ITCH_GAME: knakk
ITCH_USER: raffomania
PACKAGE: "export/android/Android apk.zip"
VERSION: ${{ steps.tag_version.outputs.tag_version }}
if: github.ref_type == 'tag'
- name: Upload linux build to itch.io
uses: yeslayla/[email protected]
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: linux
ITCH_GAME: knakk
ITCH_USER: raffomania
PACKAGE: export/linux/LinuxX11.zip
VERSION: ${{ steps.tag_version.outputs.tag_version }}
if: github.ref_type == 'tag'
- name: Upload windows build to itch.io
uses: yeslayla/[email protected]
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: windows
ITCH_GAME: knakk
ITCH_USER: raffomania
PACKAGE: "export/windows/Windows Desktop.zip"
VERSION: ${{ steps.tag_version.outputs.tag_version }}
if: github.ref_type == 'tag'
- name: Upload web build to itch.io
uses: yeslayla/[email protected]
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: web
ITCH_GAME: knakk
ITCH_USER: raffomania
PACKAGE: export/web/Web.zip
VERSION: ${{ steps.tag_version.outputs.tag_version }}
if: github.ref_type == 'tag'
- name: Upload osx build to itch.io
uses: yeslayla/[email protected]
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: osx
ITCH_GAME: knakk
ITCH_USER: raffomania
PACKAGE: export/osx/OSX.zip
VERSION: ${{ steps.tag_version.outputs.tag_version }}
if: github.ref_type == 'tag'