Skip to content

Merge branch 'master' into ags4 #31

Merge branch 'master' into ags4

Merge branch 'master' into ags4 #31

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: gets ags-toolbox
run: |
curl -Lo atbx.exe https://github.com/ericoporto/agstoolbox/releases/download/0.5.5/atbx.exe
echo "${{github.workspace}}" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install AGS
run: |
atbx install editor -q BASS
atbx install editor -q "Empty Game"
atbx install editor -q Sierra-style
atbx install editor -q Tumbleweed
atbx install editor -q "Verb Coin"
- name: Build BASS
run: atbx build ./BASS
- name: Build Sierra-style
run: atbx build ./Sierra-style
- name: Build Tumbleweed
run: atbx build ./Tumbleweed
- name: Build Verb Coin
run: atbx build "./Verb Coin"
- name: Build Empty Game
continue-on-error: true
run: atbx build "./Empty Game"
- name: Upload Artifacts of Compiled AGS Games
uses: actions/upload-artifact@v4
with:
name: game-binaries
path: |
BASS/Compiled/*/*
Empty Game/Compiled/*/*
Sierra-style/Compiled/*/*
Tumbleweed/Compiled/*/*
Verb Coin/Compiled/*/*
- name: Create Templat Build dir
run: mkdir build
- name: Package BASS as Template
run: |
atbx export template -f ./BASS "BASS.agt" ./build
- name: Package Sierra-style as Template
run: |
atbx export template -f ./Sierra-style "Sierra-style.agt" ./build
- name: Package Tumbleweed as Template
run: |
atbx export template -f ./Tumbleweed "Tumbleweed.agt" ./build
- name: Package Verb Coin as Template
run: |
atbx export template -f "./Verb Coin" "Verb Coin.agt" ./build
- name: Package Empty Game as Template
run: |
atbx export template -f "./Empty Game" "Empty Game.agt" ./build
- name: Upload Artifacts of Templates
uses: actions/upload-artifact@v4
with:
name: templates
path: |
build/*.agt
- name: Create release and upload assets
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
artifacts: build/*.agt
allowUpdates: true
omitBodyDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push to ags-templates repo
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
env:
TEMPLATES_OWNER: adventuregamestudio
BRANCH_NAME: master
CI_USER: ags-templates-ci
CI_TOKEN: ${{ secrets.TEMPLATES_CI_TOKEN }}
run: |
echo "${BRANCH_NAME}"
git clone https://${CI_USER}:${CI_TOKEN}@github.com/${TEMPLATES_OWNER}/ags-templates
cd ags-templates
git checkout "${BRANCH_NAME}"
cp ../build/*agt Templates/
git config user.name "ags-templates-ci"
git config user.email "[email protected]"
git add Templates/*.agt
git commit -m "synced templates" -m "Sync from tag ${GITHUB_REF_NAME}, created by ${GITHUB_TRIGGERING_ACTOR}" -m "originated from ${GITHUB_REPOSITORY}, tracking commit ${GITHUB_SHA}, in run ${GITHUB_RUN_NUMBER} of workflow ID ${GITHUB_RUN_ID}."
git push origin "${BRANCH_NAME}"
git push "https://${CI_USER}:${CI_TOKEN}@github.com/${TEMPLATES_OWNER}/ags-templates" --set-upstream "${BRANCH_NAME}"