diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml new file mode 100644 index 0000000..ba42549 --- /dev/null +++ b/.github/workflows/check-release.yml @@ -0,0 +1,51 @@ +name: "Check Releases" +on: + schedule: + - cron: '27 23 * * *' + push: + branches: + - master +jobs: + fetch: + name: Fetch Latest Godot Engine Release + runs-on: ubuntu-20.04 + outputs: + release_tag: ${{ steps.parse.outputs.tag }} + steps: + - id: parse + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + TAG=$(gh release view --repo godotengine/godot --json tagName --jq .tagName) + echo "tag=$TAG" >> $GITHUB_OUTPUT + current: + name: Fetch Current Godot CI release + runs-on: ubuntu-20.04 + outputs: + release_tag: ${{ steps.parse.outputs.tag }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - id: parse + run: echo "tag=$(git tag --list --sort=-creatordate | head --lines 1)" >> $GITHUB_OUTPUT + create: + needs: [fetch, current] + name: Create New Godot CI Release + runs-on: ubuntu-20.04 + if: needs.fetch.outputs.release_tag != needs.current.outputs.release_tag + steps: + - uses: actions/checkout@v3 + - run: gh release view --repo godotengine/godot --json body --jq .body | sed 's/\\r\\n/\n/g' > body.txt + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - run: | + git config user.name github-actions + git config user.email github-actions@github.com + git tag ${{ needs.fetch.outputs.release_tag }} + git push + - uses: softprops/action-gh-release@v0.1.14 + with: + body_path: body.txt + tag_name: ${{ needs.fetch.outputs.release_tag }} + token: ${{ secrets.PAT }} diff --git a/.github/workflows/godot-ci.yml b/.github/workflows/godot-ci.yml new file mode 100644 index 0000000..70472dc --- /dev/null +++ b/.github/workflows/godot-ci.yml @@ -0,0 +1,118 @@ +name: "godot-ci export" +on: push + +env: + GODOT_VERSION: "4.0" + EXPORT_NAME: ultimate-myanmar-typing-wizard + PROJECT_PATH: ./ + +jobs: + export-windows: + name: Windows Export + runs-on: ubuntu-20.04 + container: + image: 09799474633/mm-typing-game-godot + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + lfs: true + - name: Setup + run: | + mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable + cp -rvf /templates/${GODOT_VERSION}.stable/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/ + - name: Windows Build + run: | + mkdir -v -p build/windows + cp -rvf Texts build/windows/ + godot --headless --export-debug "Windows Desktop" + + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: ultimate-myanmar-typing-wizard_windows_debug_x64_64.zip + path: build/windows + + export-linux: + name: Linux Export + runs-on: ubuntu-20.04 + container: + image: 09799474633/mm-typing-game-godot + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + lfs: true + - name: Setup + run: | + mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable + cp -rvf /templates/${GODOT_VERSION}.stable/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/ + - name: Linux Build + run: | + mkdir -v -p build/linux + cp -rvf Texts build/linux/ + godot --headless --export-debug "Linux/X11" + + - name: Upload Artifact + uses: actions/upload-artifact@v1 + with: + name: ultimate-myanmar-typing-wizard_linux_debug_x86_x64.zip + path: build/linux + + # export-web: + # name: Web Export + # runs-on: ubuntu-20.04 + # container: + # image: barichello/godot-ci:3.3.4 + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # with: + # lfs: true + # - name: Setup + # run: | + # mkdir -v -p ~/.local/share/godot/templates + # mv /templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + # - name: Web Build + # run: | + # mkdir -v -p build/web + # cd $PROJECT_PATH + # godot -v --export "HTML5" ../build/web/index.html + # - name: Upload Artifact + # uses: actions/upload-artifact@v1 + # with: + # name: web + # path: build/web + # - name: Install rsync 📚 + # run: | + # apt-get update && apt-get install -y rsync + # - name: Deploy to GitHub Pages 🚀 + # uses: JamesIves/github-pages-deploy-action@releases/v4 + # with: + # branch: gh-pages # The branch the action should deploy to. + # folder: build/web # The folder the action should deploy. + + # export-mac: + # name: Mac Export + # runs-on: ubuntu-20.04 + # container: + # image: barichello/godot-ci:3.3.4 + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # with: + # lfs: true + # - name: Setup + # run: | + # mkdir -v -p ~/.local/share/godot/templates + # mv /templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable + # - name: Mac Build + # run: | + # mkdir -v -p build/mac + # cd $PROJECT_PATH + # godot -v --export "Mac OSX" ../build/mac/$EXPORT_NAME.zip + # - name: Upload Artifact + # uses: actions/upload-artifact@v1 + # with: + # name: mac + # path: build/mac diff --git a/.github/workflows/manual_build.yml b/.github/workflows/manual_build.yml new file mode 100644 index 0000000..764e773 --- /dev/null +++ b/.github/workflows/manual_build.yml @@ -0,0 +1,79 @@ +name: Manual Build +on: + workflow_dispatch: + inputs: + version: + description: 'Version of engine to build e.g. "3.4.4", "3.5"' + required: true + type: string + release_name: + description: 'Release name, usually "stable", but can also be something like "rc3", "beta1"' + type: string + default: "stable" + required: true +env: + IMAGE_NAME: godot-ci +jobs: + build: + name: Build Image + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + - name: Login to GitHub Container Registry + uses: docker/login-action@v1.14.1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - run: echo IMAGE_TAG=$(echo ${{ github.event.inputs.release_name != 'stable' && format('.{0}', github.event.inputs.release_name) || '' }}) >> $GITHUB_ENV + - name: Build and push Docker images + uses: docker/build-push-action@v2.9.0 + with: + context: . + file: Dockerfile + push: true + tags: | + ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}${{ env.IMAGE_TAG }} + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.version }}${{ env.IMAGE_TAG }} + build-args: | + GODOT_VERSION=${{ github.event.inputs.version }} + RELEASE_NAME=${{ github.event.inputs.release_name }} + SUBDIR=${{ github.event.inputs.release_name != 'stable' && format('/{0}', github.event.inputs.release_name) || '' }} + build-mono: + name: Build Mono Image + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + - name: Login to GitHub Container Registry + uses: docker/login-action@v1.14.1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - run: echo IMAGE_TAG=$(echo ${{ github.event.inputs.release_name != 'stable' && format('.{0}', github.event.inputs.release_name) || '' }}) >> $GITHUB_ENV + - name: Build and push Docker images + uses: docker/build-push-action@v2.9.0 + with: + context: . + file: mono.Dockerfile + push: true + tags: | + ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:mono-${{ github.event.inputs.version }}${{ env.IMAGE_TAG }} + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-${{ github.event.inputs.version }}${{ env.IMAGE_TAG }} + build-args: | + GODOT_VERSION=${{ github.event.inputs.version }} + RELEASE_NAME=${{ github.event.inputs.release_name }} + SUBDIR=${{ github.event.inputs.release_name != 'stable' && format('/{0}', github.event.inputs.release_name) || '' }} + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8ccdc67 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,84 @@ +name: Release +on: + release: + types: [released] +env: + IMAGE_NAME: godot-ci +jobs: + version: + name: Get Version + runs-on: ubuntu-20.04 + outputs: + version: ${{ steps.calculate.outputs.version }} + release_name: ${{ steps.calculate.outputs.release_name }} + steps: + - id: calculate + run: | + REF_NAME=${{ github.ref_name }} + echo "version=${REF_NAME%-*}" >> $GITHUB_OUTPUT + echo "release_name=${REF_NAME#*-}" >> $GITHUB_OUTPUT + build: + name: Build Image + runs-on: ubuntu-20.04 + needs: [version] + steps: + - uses: actions/checkout@v3 + - run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + - name: Login to GitHub Container Registry + uses: docker/login-action@v1.14.1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v2.9.0 + with: + context: . + file: Dockerfile + push: true + tags: | + ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:${{ needs.version.outputs.version }} + ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:latest + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ needs.version.outputs.version }} + build-args: | + GODOT_VERSION=${{ needs.version.outputs.version }} + RELEASE_NAME=${{ needs.version.outputs.release_name }} + build-mono: + name: Build Mono Image + runs-on: ubuntu-20.04 + needs: [version] + steps: + - uses: actions/checkout@v3 + - run: echo IMAGE_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + - name: Login to GitHub Container Registry + uses: docker/login-action@v1.14.1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v2.9.0 + with: + context: . + file: mono.Dockerfile + push: true + tags: | + ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:mono-${{ needs.version.outputs.version }} + ghcr.io/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:mono-latest + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-latest + ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:mono-${{ needs.version.outputs.version }} + build-args: | + GODOT_VERSION=${{ needs.version.outputs.version }} + RELEASE_NAME=${{ needs.version.outputs.release_name }} + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7d53a8a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,70 @@ +FROM ubuntu:focal +LABEL author="https://github.com/aBARICHELLO/godot-ci/graphs/contributors" + +USER root +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + git \ + git-lfs \ + # python \ + # python-openssl \ + unzip \ + wget \ + zip \ + # adb \ + # openjdk-11-jdk-headless \ + rsync \ + && rm -rf /var/lib/apt/lists/* + +ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 + +ARG GODOT_VERSION="4.0" +ARG RELEASE_NAME="stable" +ARG SUBDIR="" +ARG GODOT_TEST_ARGS="" +ARG GODOT_PLATFORM="linux.x86_64" + +RUN wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \ + && wget https://downloads.tuxfamily.org/godotengine/${GODOT_VERSION}${SUBDIR}/Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \ + && mkdir ~/.cache \ + && mkdir -p ~/.config/godot \ + && mkdir -p ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME} \ + && ln -s ~/.local/share/godot/templates ~/.local/share/godot/export_templates \ + && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip \ + && mv Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM} /usr/local/bin/godot \ + && unzip Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz \ + && mv templates/* ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME} \ + && rm -f Godot_v${GODOT_VERSION}-${RELEASE_NAME}_export_templates.tpz Godot_v${GODOT_VERSION}-${RELEASE_NAME}_${GODOT_PLATFORM}.zip + +ADD getbutler.sh /opt/butler/getbutler.sh +RUN bash /opt/butler/getbutler.sh +RUN /opt/butler/bin/butler -V + +ENV PATH="/opt/butler/bin:${PATH}" +RUN mv ~/.local/share/godot/templates/${GODOT_VERSION}.${RELEASE_NAME} templates/ +RUN chmod 777 -R templates/* + +# # Download and setup android-sdk +# ENV ANDROID_HOME="/usr/lib/android-sdk" +# RUN wget https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip \ +# && unzip commandlinetools-linux-*_latest.zip -d cmdline-tools \ +# && mv cmdline-tools $ANDROID_HOME/ \ +# && rm -f commandlinetools-linux-*_latest.zip + +# ENV PATH="${ANDROID_HOME}/cmdline-tools/cmdline-tools/bin:${PATH}" + +# RUN yes | sdkmanager --licenses \ +# && sdkmanager "platform-tools" "build-tools;30.0.3" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529" + +# # Adding android keystore and settings +# RUN keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 \ +# && mv debug.keystore /root/debug.keystore + +# RUN echo 'export/android/android_sdk_path = "/usr/lib/android-sdk"' >> ~/.config/godot/editor_settings-3.tres +# RUN echo 'export/android/debug_keystore = "/root/debug.keystore"' >> ~/.config/godot/editor_settings-3.tres +# RUN echo 'export/android/debug_keystore_user = "androiddebugkey"' >> ~/.config/godot/editor_settings-3.tres +# RUN echo 'export/android/debug_keystore_pass = "android"' >> ~/.config/godot/editor_settings-3.tres +# RUN echo 'export/android/force_system_user = false' >> ~/.config/godot/editor_settings-3.tres +# RUN echo 'export/android/timestamping_authority_url = ""' >> ~/.config/godot/editor_settings-3.tres +# RUN echo 'export/android/shutdown_adb_on_exit = true' >> ~/.config/godot/editor_settings-3.tres diff --git a/export_presets.cfg b/export_presets.cfg index b25abc4..4867673 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -8,7 +8,7 @@ custom_features="" export_filter="all_resources" include_filter="*.txt" exclude_filter="" -export_path="build/Linux/UltimateMyanmarTypingWizard.x86_64" +export_path="build/linux/UltimateMyanmarTypingWizard.x86_64" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -49,7 +49,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="build/Windows/UltimateMyanmarTypingWizard.exe" +export_path="build/windows/UltimateMyanmarTypingWizard.exe" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false @@ -217,7 +217,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="build/HTML5/TypingTrailer.html" +export_path="build/html5/UltimateMyanmarTypingWizard.html" encryption_include_filters="" encryption_exclude_filters="" encrypt_pck=false diff --git a/getbutler.sh b/getbutler.sh new file mode 100644 index 0000000..c28f440 --- /dev/null +++ b/getbutler.sh @@ -0,0 +1,13 @@ +#!/usr/bin/bash + +mkdir -p /opt/butler/bin +cd /opt/butler/bin + +wget -O butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default +unzip butler.zip + +# GNU unzip tends to not set the executable bit even though it's set in the .zip +chmod +x butler + +export PATH=/opt/butler/bin/:$PATH +cd ~ diff --git a/gitlab-ci.yml b/gitlab-ci.yml new file mode 100644 index 0000000..5ebd182 --- /dev/null +++ b/gitlab-ci.yml @@ -0,0 +1,174 @@ +include: VersionInfo.yml + +stages: + - build + - pack + - deploy + +variables: + REVISION_NUMBER: ${RELEASE_NUMBER}_${CI_COMMIT_SHORT_SHA} + EXPORT_NAME_RELEASE: ${GAME_NAME}_${RELEASE_NUMBER} + EXPORT_NAME_INTERNAL: ${GAME_NAME}_${RELEASE_NUMBER}_${CI_COMMIT_SHORT_SHA} + GIT_SUBMODULE_STRATEGY: recursive + +# ================================================================================================================ +# Job Dependencies +# ================================================================================================================ +# =+=+=+=+=+=+=+= BUILD COMMON =+=+=+=+=+=+=+= +.build-internal: &build-internal + image: sdggames/godot-ci:$GODOT_VERSION + script: + - mkdir -v -p build/$BUILD_FOLDER + - mkdir -v -p .godot/editor + - mkdir -v -p .godot/imported + - echo godot -v --headless $EXPORT_MODE "$BUILD_TARGET" build/$BUILD_FOLDER/$EXPORT_NAME_INTERNAL$BUILD_FILE_EXTENSION + - godot -v --headless $EXPORT_MODE "$BUILD_TARGET" build/$BUILD_FOLDER/$EXPORT_NAME_INTERNAL$BUILD_FILE_EXTENSION + artifacts: + name: $EXPORT_NAME_INTERNAL + paths: + - build/ + expire_in: 6 hour # We have a consolidated copy created in the final stage, just keep this while the pipeline might be running. + +.build-release: &build-release + image: sdggames/godot-ci:$GODOT_VERSION + script: + - mkdir -v -p build/$BUILD_FOLDER + - mkdir -v -p .godot/editor + - mkdir -v -p .godot/imported + - echo godot -v --headless $EXPORT_MODE "$BUILD_TARGET" build/$BUILD_FOLDER/$EXPORT_NAME_RELEASE$BUILD_FILE_EXTENSION + - godot -v --headless $EXPORT_MODE "$BUILD_TARGET" build/$BUILD_FOLDER/$EXPORT_NAME_RELEASE$BUILD_FILE_EXTENSION + artifacts: + name: $EXPORT_NAME_RELEASE + paths: + - build/ + expire_in: 6 hour # We have a consolidated copy created in the final stage, just keep this while the pipeline might be running. + +.build-web: &build-web + image: sdggames/godot-ci:$GODOT_VERSION + script: + - mkdir -v -p build/$BUILD_FOLDER + - mkdir -v -p .godot/editor + - mkdir -v -p .godot/imported + - echo godot -v --headless $EXPORT_MODE "$BUILD_TARGET" build/$BUILD_FOLDER/index.html + - godot -v --headless $EXPORT_MODE "$BUILD_TARGET" build/$BUILD_FOLDER/index.html + artifacts: + name: $EXPORT_NAME_RELEASE + paths: + - build/ + expire_in: 6 hour # We have a consolidated copy created in the final stage, just keep this while the pipeline might be running. + +# ================================================================================================================ +# Jobs +# ================================================================================================================ +# =+=+=+=+=+=+=+= BUILD JOBS - DEBUG =+=+=+=+=+=+=+= +build_internal:windows-debug: + stage: build + variables: + BUILD_FILE_EXTENSION: .exe + BUILD_TARGET: "Windows" + BUILD_FOLDER: "windows-debug" + EXPORT_MODE: "--export-debug" + <<: *build-internal + except: + - main + +build_internal:mac-debug: + stage: build + variables: + BUILD_FILE_EXTENSION: .zip + BUILD_TARGET: "macOS" + BUILD_FOLDER: "mac-debug" + EXPORT_MODE: "--export-debug" + <<: *build-internal + except: + - main + +build_internal:linux-debug: + stage: build + variables: + BUILD_FILE_EXTENSION: .x86_64 + BUILD_TARGET: "Linux" + BUILD_FOLDER: "linux-debug" + EXPORT_MODE: "--export-debug" + <<: *build-internal + except: + - main + +build_internal:web-debug: + stage: build + variables: + BUILD_FILE_EXTENSION: index.html + BUILD_TARGET: "Web" + BUILD_FOLDER: "web-debug" + EXPORT_MODE: "--export-debug" + <<: *build-web + except: + - main + +# =+=+=+=+=+=+=+= BUILD JOBS - RELEASE =+=+=+=+=+=+=+= +build_release:windows-release: + stage: build + variables: + BUILD_FILE_EXTENSION: .exe + BUILD_TARGET: "Windows" + BUILD_FOLDER: "windows-release" + EXPORT_MODE: "--export-release" + <<: *build-release + +build_release:mac-release: + stage: build + variables: + BUILD_FILE_EXTENSION: .zip + BUILD_TARGET: "macOS" + BUILD_FOLDER: "mac-release" + EXPORT_MODE: "--export-release" + <<: *build-release + +build_release:linux-release: + stage: build + variables: + BUILD_FILE_EXTENSION: .x86_64 + BUILD_TARGET: "Linux" + BUILD_FOLDER: "linux-release" + EXPORT_MODE: "--export-release" + <<: *build-release + +build_release:web-release: + stage: build + variables: + BUILD_FILE_EXTENSION: index.html + BUILD_TARGET: "Web" + BUILD_FOLDER: "web-release" + EXPORT_MODE: "--export-release" + <<: *build-web + +# =+=+=+=+=+=+=+= PACK JOBS =+=+=+=+=+=+=+= +# Contain all of the builds in a single artifact so we don't have to download all the things! +consolidateArtifacts: + image: alpine:latest + stage: pack + script: "ls ./build" + artifacts: + name: $GAME_NAME_$REVISION_NUMBER + expose_as: "Build Output" + paths: + - ./build/ + expire_in: 1 day # This is huge, we probably want to save it to a repo somewhere so we don't run out of space. + +# =+=+=+=+=+=+=+= DEPLOY JOBS =+=+=+=+=+=+=+= +itchio-deploy: + image: sdggames/godot-ci:$GODOT_VERSION + stage: deploy + script: + - butler push ./build/linux-release $GROUP_NAME/$GAME_NAME:linux + - butler push ./build/windows-release $GROUP_NAME/$GAME_NAME:windows + - butler push ./build/mac-release $GROUP_NAME/$GAME_NAME:mac + - butler push ./build/web-release $GROUP_NAME/$GAME_NAME:web + needs: + - build_release:linux-release + - build_release:windows-release + - build_release:mac-release + - build_release:web-release + only: + - main + when: manual