trigger_build #142
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: π GHA | ||
on: | ||
repository_dispatch: | ||
types: [trigger_build] | ||
env: | ||
BASE_NAME: Blazium_v | ||
GODOT_BASE_BRANCH: blazium-dev | ||
concurrency: | ||
group: ci-${{ github.actor }}-${{ github.event.client_payload.type || 'nightly' }}-runner | ||
cancel-in-progress: true | ||
jobs: | ||
get-latest-sha: | ||
name: π Get Latest SHA & Base Version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
build_sha: ${{ steps.get_sha.outputs.sha }} | ||
external_major: ${{ steps.version.outputs.external_major }} | ||
external_minor: ${{ steps.version.outputs.external_minor }} | ||
external_patch: ${{ steps.version.outputs.external_patch }} | ||
external_status: ${{ steps.version.outputs.external_status }} | ||
external_sha: ${{ steps.version.outputs.external_sha }} | ||
new_major: ${{ steps.new_version.outputs.major }} | ||
new_minor: ${{ steps.new_version.outputs.minor }} | ||
new_patch: ${{ steps.new_version.outputs.patch }} | ||
new_version: ${{ steps.new_version.outputs.version_string }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: blazium-engine/blazium | ||
ref: ${{ github.event.client_payload.branch || env.GODOT_BASE_BRANCH }} | ||
fetch-depth: 2 | ||
- name: Pull .github folder from ci_cd repository | ||
run: | | ||
git clone --depth=1 https://github.com/blazium-engine/ci_cd.git ci_cd_repo | ||
cp -r ci_cd_repo/.github/* .github/ | ||
mv ci_cd_repo/cicd ./ | ||
rm -rf ci_cd_repo | ||
- name: Get Latest Commit SHA | ||
id: get_sha | ||
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
- name: Parse version.py | ||
id: version | ||
uses: ./.github/actions/get-repos-version | ||
with: | ||
file_path: version.py | ||
- name: Generate Changelog.json | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
GITHUB_OWNER: blazium-engine | ||
GITHUB_REPO: blazium | ||
BASE_BRANCH: ${{ steps.version.outputs.external_sha }} | ||
CURRENT_BRANCH: ${{ steps.get_sha.outputs.sha }} | ||
MAJOR_VERSION: ${{ steps.version.outputs.external_major }} | ||
MINOR_VERSION: ${{ steps.version.outputs.external_minor }} | ||
PATCH_VERSION: ${{ steps.version.outputs.external_patch }} | ||
run: | | ||
node ./cicd/scripts/changelog.js $(pwd) | ||
- name: Get Verson of Changelog | ||
id: new_version | ||
uses: ./.github/actions/version-from-changelog | ||
with: | ||
file_path: ${{ github.workspace }}/changelog.json | ||
- name: blah | ||
id: get_sha | ||
run: echo "${{ steps.new_version.outputs.major }}" >> $GITHUB_OUTPUT | ||
# static-checks: | ||
# name: π Static checks | ||
# needs: get-latest-sha | ||
# uses: ./.github/workflows/static_checks.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# web-build: | ||
# name: π Web | ||
# needs: [get-latest-sha, static-checks] | ||
# if: contains(github.event.client_payload.build, 'web') | ||
# uses: ./.github/workflows/web_builds.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# monoglue-build: | ||
# name: Mono Glue | ||
# needs: [get-latest-sha, static-checks] | ||
# if: contains(github.event.client_payload.build, 'monoglue') | ||
# uses: ./.github/workflows/mono_glue_build.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# android-build: | ||
# name: π€ Android | ||
# needs: [monoglue-build] | ||
# if: contains(github.event.client_payload.build, 'android') | ||
# uses: ./.github/workflows/android_builds.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# ios-build: | ||
# name: π iOS | ||
# needs: [monoglue-build] | ||
# if: contains(github.event.client_payload.build, 'ios') | ||
# uses: ./.github/workflows/ios_builds.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# linux-build: | ||
# name: π§ Linux | ||
# needs: [monoglue-build] | ||
# if: contains(github.event.client_payload.build, 'linux') | ||
# uses: ./.github/workflows/linux_builds.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# macos-build: | ||
# name: π macOS | ||
# needs: [monoglue-build] | ||
# if: contains(github.event.client_payload.build, 'macos') | ||
# uses: ./.github/workflows/macos_builds.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# windows-build: | ||
# name: π Windows | ||
# needs: [monoglue-build] | ||
# if: contains(github.event.client_payload.build, 'windows') | ||
# uses: ./.github/workflows/windows_builds.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# deploy: | ||
# name: Deploy | ||
# needs: [monoglue-build, windows-build, macos-build, linux-build, android-build, ios-build] | ||
# if: always() | ||
# uses: ./.github/workflows/deploy_all.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# monoglue-build: ${{ needs.monoglue-build.result }} | ||
# windows-build: ${{ needs.windows-build.result }} | ||
# macos-build: ${{ needs.macos-build.result }} | ||
# linux-build: ${{ needs.linux-build.result }} | ||
# android-build: ${{ needs.android-build.result }} | ||
# ios-build: ${{ needs.ios-build.result }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} | ||
# cleanup: | ||
# name: Clean Up | ||
# needs: [monoglue-build, windows-build, macos-build, linux-build, android-build, ios-build] | ||
# if: always() && (failure() || cancelled()) | ||
# uses: ./.github/workflows/clean_up.yml | ||
# secrets: inherit | ||
# with: | ||
# build_sha: ${{ needs.get-latest-sha.outputs.build_sha }} | ||
# runner_id: ${{ github.run_id }} | ||
# monoglue-build: ${{ needs.monoglue-build.result }} | ||
# windows-build: ${{ needs.windows-build.result }} | ||
# macos-build: ${{ needs.macos-build.result }} | ||
# linux-build: ${{ needs.linux-build.result }} | ||
# android-build: ${{ needs.android-build.result }} | ||
# ios-build: ${{ needs.ios-build.result }} | ||
# new_major: ${{ needs.get-latest-sha.outputs.new_major }} | ||
# new_minor: ${{ needs.get-latest-sha.outputs.new_minor }} | ||
# new_patch: ${{ needs.get-latest-sha.outputs.new_patch }} | ||
# new_version: ${{ needs.get-latest-sha.outputs.new_version }} |