From cf3495debd6d274eb288e0f9eace00cc56885f9c Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Thu, 31 Aug 2023 13:58:07 +0900 Subject: [PATCH] fix commit_artifacts --- .github/workflows/build.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6deee3..7447a14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -204,13 +204,21 @@ jobs: if not os.path.exists(f.replace(SRC_DIR, DEST_DIR)): raise Exception("New file (need to generate .meta): " + f.replace(SRC_DIR, DEST_DIR)) os.rename(f, f.replace(SRC_DIR, DEST_DIR)) - - run: | + - name: Create new branch + if: github.event.inputs.commit_artifacts == 'another_branch' + run: | + git checkout -b "gha/$(git rev-parse --abbrev-ref HEAD)" + - name: Commit + run: | git config --global user.name "GitHub Actions" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git add Assets/Plugins/UnityOpus/Plugins git commit -m 'Update binaries' - - if: github.event.inputs.commit_artifacts == 'another_branch' + - name: Push (Force) + if: github.event.inputs.commit_artifacts == 'another_branch' run: | - git checkout -b "gha/$(git rev-parse --abbrev-ref HEAD)" - git push -f - - run: git push + git push -f origin "$(git rev-parse --abbrev-ref HEAD)" + - name: Push + if: github.event.inputs.commit_artifacts == 'direct' + run: | + git push origin "$(git rev-parse --abbrev-ref HEAD)" \ No newline at end of file