Release #24
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
build-release: | |
runs-on: ubuntu-latest | |
container: | |
image: barichello/godot-ci:3.6 | |
strategy: | |
matrix: | |
# Remove channel if not releasing (Available: win, linux, mac, web, android) | |
channel: [android-apk, android-aab] | |
env: | |
GAME: geometry-tap | |
CHANNEL: ${{matrix.channel}} | |
GODOT_VERSION: 3.6 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Setup Templates | |
run: ./scripts/prepare-templates.sh $GODOT_VERSION | |
- name: Prepare android release | |
env: | |
ANDROID_KEYSTORE: ${{secrets.ANDROID_RELEASE_KEYSTORE}} | |
ANDROID_KEYSTORE_USER: ${{secrets.ANDROID_RELEASE_KEYSTORE_USER}} | |
ANDROID_KEYSTORE_PW: ${{secrets.ANDROID_RELEASE_KEYSTORE_PW}} | |
if: | | |
startsWith(env.CHANNEL, 'android') && | |
env.ANDROID_KEYSTORE && | |
env.ANDROID_KEYSTORE_USER && | |
env.ANDROID_KEYSTORE_PW | |
run: | | |
echo $ANDROID_HOME | |
echo $ANDROID_SDK_ROOT | |
echo $ANDROID_KEYSTORE | base64 --decode > ./release.keystore | |
sed 's@keystore/release=".*"@keystore/release="'./release.keystore'"@g' -i export_presets.cfg | |
sed 's@keystore/release_user=".*"@keystore/release_user="'$ANDROID_KEYSTORE_USER'"@g' -i export_presets.cfg | |
sed 's@keystore/release_password=".*"@keystore/release_password="'$ANDROID_KEYSTORE_PW'"@g' -i export_presets.cfg | |
- name: Set variables | |
id: info | |
run: | | |
echo "Channel: ${CHANNEL%-*}" | |
echo "extension=${CHANNEL#*-}" >> $GITHUB_ENV | |
echo "actual_channel=${CHANNEL%-*}" >> $GITHUB_ENV | |
- name: Prepare android-aab release | |
if: env.CHANNEL == 'android-aab' | |
run: | | |
sed 's@export_path=".*"@export_path="build/android/main.aab"@g' -i export_presets.cfg | |
sed 's@custom_build/export_format=0@custom_build/export_format=1@g' -i export_presets.cfg | |
- name: Build | |
run: ./scripts/build-channel.sh $actual_channel | |
# - name: Publish Itch | |
# if: env.BUTLER_API_KEY && env.GAME && !contains(github.ref, '-pre') | |
# shell: bash | |
# env: | |
# BUTLER_API_KEY: ${{secrets.BUTLER_API_KEY}} | |
# USER: ${{secrets.ITCHIO_USER}} | |
# run: butler push build/$CHANNEL kuma-gee/$GAME:$CHANNEL --userversion ${GITHUB_REF/refs\/tags\//} | |
# - name: Package builds | |
# if: | | |
# env.CHANNEL != 'android' && | |
# env.CHANNEL != 'mac' | |
# run: | | |
# cd build | |
# mv $CHANNEL $GAME && zip -r $GAME-$CHANNEL.zip $GAME | |
# Upload exported build | |
# - name: Upload artifacts | |
# if: env.CHANNEL != 'android' | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: release | |
# path: build/**/*.zip | |
- name: Upload android app bundle | |
if: env.CHANNEL == 'android' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release | |
path: build/**/*.${{ env.extension }} | |
github-release: | |
runs-on: ubuntu-latest | |
needs: build-release | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: release | |
- run: ls | |
- uses: marvinpinto/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
files: | | |
**/*.zip | |
**/*.apk | |
**/*.aab |