Build All Platforms: kjblanchard #41
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: Build All Platforms | |
run-name: "Build All Platforms: ${{ github.actor }}" | |
on: | |
push: | |
tags: | |
- "v*" | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
Build-Desktop: | |
strategy: | |
matrix: | |
include: | |
- os: windows | |
make_cmd: wrebuild | |
suffix: zip | |
zlib: wzlib | |
name: win | |
- os: macos | |
make_cmd: xrebuild | |
suffix: tgz | |
zlib: zlib | |
name: mac | |
- os: macos | |
make_cmd: irebuild | |
suffix: tgz | |
zlib: zlib | |
name: ios-simulator | |
- os: ubuntu | |
make_cmd: brebuild | |
suffix: tgz | |
zlib: zlib | |
name: linux | |
runs-on: ${{ matrix.os }}-latest | |
environment: prod | |
steps: | |
- run: pip install --upgrade cppclean | |
name: Install cppclean | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Configure CMake | |
run: make BUILD_TYPE=Release DEFAULT_IMGUI=OFF ${{ matrix.make_cmd}} | |
- name: Save packaged artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }}-artifacts | |
path: build/EscapeTheFate.${{ matrix.suffix }} | |
Build-Emscripten: | |
runs-on: ubuntu-latest | |
environment: prod | |
container: | |
image: emscripten/emsdk:3.1.70 | |
env: | |
THING_ADD: <div><br>Use WASD to move<br>Built with github actions!<br>Press B to "enter battle" and R to Reset.</div> | |
credentials: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
path: repo | |
submodules: recursive | |
- name: Install CMake | |
run: | | |
apt update -y && apt upgrade -y | |
apt install cmake pkg-config -y | |
- name: Actual build | |
run: cd repo && make CMAKE_BUILD_TYPE=Release DEFAULT_IMGUI=OFF erebuild | |
- name: Update html build | |
run: cd repo/build/bin && awk '/<textarea id="output" rows="8"><\/textarea>/ {print; print ENVIRON["THING_ADD"]; next} 1' EscapeTheFate.html > temp.html && mv temp.html EscapeTheFate.html | |
- uses: actions/upload-artifact@v4 | |
name: Upload to S3 | |
with: | |
name: s3Artifact | |
path: repo/build/bin | |
Push-Files-To-S3: | |
uses: supergoongaming/sharedWorkflows/.github/workflows/push_to_s3.yml@master | |
needs: Build-Emscripten | |
secrets: | |
IAM_SECRET: ${{ secrets.IAM_SECRET }} | |
with: | |
IAM_USER: ${{ vars.IAM_USER }} | |
bucket_region: "us-east-1" | |
bucket_name: "etf-external-site" | |
Create-Release: | |
strategy: | |
matrix: | |
include: | |
- os: win | |
artifact_name: EscapeTheFate.zip | |
asset_name: supergoon_win.zip | |
- os: mac | |
artifact_name: EscapeTheFate.tgz | |
asset_name: supergoon_mac.tgz | |
- os: ios-simulator | |
artifact_name: EscapeTheFate.tgz | |
asset_name: supergoon_ios_sim.tgz | |
- os: linux | |
artifact_name: EscapeTheFate.tgz | |
asset_name: supergoon_ubuntu.tgz | |
if: startsWith(github.event.ref, 'refs/tags/v') | |
runs-on: ubuntu-latest | |
environment: prod | |
needs: | |
- Build-Desktop | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Fetch tags | |
run: git fetch --tags --force | |
- name: Download Build Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-artifacts | |
- name: Get current tag annotation | |
id: tag-data | |
run: | | |
{ | |
echo 'annotation<<EOF' | |
git for-each-ref "${GITHUB_REF}" --format '%(contents)' | |
echo 'EOF' | |
} >>"${GITHUB_OUTPUT}" | |
- name: Upload binaries to release | |
env: | |
ANNOTATION: ${{ steps.tag-data.outputs.git-tag-annotation }} | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ matrix.artifact_name }} | |
asset_name: ${{ matrix.asset_name }} | |
tag: ${{ github.ref }} | |
overwrite: true | |
body: ${{ steps.tag-data.outputs.annotation }} |