im a dumbass lol #468
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 Geode Mod | |
on: | |
workflow_dispatch: | |
push: | |
permissions: | |
contents: write | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update-modules: | |
name: Update Modules | |
runs-on: ubuntu-latest | |
# https://stackoverflow.com/questions/64407333/using-github-actions-to-automatically-update-the-repos-submodules | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
#token: ${{ secrets.CI_TOKEN }} | |
path: code | |
submodules: true | |
- name: Checkout Clicks Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: clicksounds/clicks | |
path: clicks | |
# Update references | |
- name: Git Submodule Update | |
run: | | |
cd code | |
git pull --recurse-submodules | |
git submodule update --remote --recursive | |
- name: Run AddToClickList | |
run: cd code/.github/AddToClickList; python main.py | |
- name: Commit update | |
run: | | |
cd code | |
git config --global user.name 'Clicks Submodule/Click List Updater' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "Update clicksounds/clicks module and update clicklist" && git push || echo "No changes to commit" | |
build: | |
needs: ["update-modules"] | |
if: needs.update-modules.result == 'success' || needs.update-modules.result != 'success' | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Windows | |
os: windows-latest | |
- name: macOS | |
os: macos-latest | |
- name: Android32 | |
os: ubuntu-latest | |
target: Android32 | |
- name: Android64 | |
os: ubuntu-latest | |
target: Android64 | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the mod | |
uses: geode-sdk/build-geode-mod@main | |
with: | |
combine: true | |
#sdk: nightly | |
target: ${{ matrix.config.target }} | |
package: | |
name: Package builds | |
runs-on: ubuntu-latest | |
needs: ['build', 'update-modules'] | |
if: (needs.update-modules.result == 'success' || needs.update-modules.result != 'success') && needs.build.result == 'success' | |
steps: | |
- uses: geode-sdk/build-geode-mod@combine | |
id: build | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Build Output | |
path: ${{ steps.build.outputs.build-output }} |