From a6e26cdeae6fe214fdd27d686c6ee9b6ca68838a Mon Sep 17 00:00:00 2001 From: Rachel Date: Tue, 23 Jan 2024 21:46:06 -0800 Subject: [PATCH] Commit xMAP to a branch on each push to main --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dbc8f7cf59..600e46dc1d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,3 +55,25 @@ jobs: name: pokeplatinum-failure-${{ github.run_id }} path: failure.tar.gz retention-days: 1 + + - name: Checkout xMAP + if: ${{ github.event_name == 'push' }} + uses: actions/checkout@v4 + with: + path: 'xmap' + ref: 'xmap' + + - name: Move xMAP + if: ${{ github.event_name == 'push' }} + run: | + mkdir -p xmap + cp build/*.xMAP xmap/platinumus.xMAP + echo "XMAP_COMMIT_MSG=$( git log --format=%s ${GITHUB_SHA} )" >> $GITHUB_ENV + + - name: Update xMAP + if: ${{ github.event_name == 'push' }} + uses: EndBug/add-and-commit@v9 + with: + cwd: "./xmap" + add: "*.xMAP" + message: ${{ env.XMAP_COMMIT_MSG }}