From d90b6bacebad07d12b6c35cc60f821b507683aec Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 9 Nov 2023 02:48:39 -0500 Subject: [PATCH 1/7] Updated CreateRelease.yml --- .github/workflows/CreateRelease.yml | 85 ++++++++++++++++++----------- 1 file changed, 52 insertions(+), 33 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index bf5773a7f..beef1819a 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -6,45 +6,64 @@ on: jobs: CreateRelease: runs-on: ubuntu-latest + steps: - - name: Checkout Repo - uses: actions/checkout@v2 - with: - ref: AssetStoreRelease + - name: Checkout Repository + uses: actions/checkout@v2 - - name: Merge master into AssetStoreRelease - run: | - git fetch origin master --depth 1 - git reset --hard origin/master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set Git Config + run: | + git config user.name ${{ secrets.COMMITTER_NAME }} + git config user.email ${{ secrets.COMMITTER_EMAIL }} - - name: Set up .NET Core - uses: actions/setup-dotnet@v1 + - name: Merge Master into AssetStoreRelease + run: | + git checkout AssetStoreRelease + git merge master + git push - - name: Install dotnet-script - run: | - dotnet tool install -g dotnet-script - dotnet script --version +#jobs: +# CreateRelease: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout Repo +# uses: actions/checkout@v2 +# with: +# ref: AssetStoreRelease - - name: Run CreateRelease.cs - run: | - dotnet script .github/CreateRelease.cs +# - name: Merge master into AssetStoreRelease +# run: | +# git fetch origin master --depth 1 +# git reset --hard origin/master +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Commit and Push - run: | - git config --local user.name ${{ secrets.COMMITTER_NAME }} - git config --local user.email ${{ secrets.COMMITTER_EMAIL }} - git add Assets/Mirror/version.txt - git commit -m "release!: Asset Store Release" -a +# - name: Set up .NET Core +# uses: actions/setup-dotnet@v1 - # Configure Git to rebase when pulling - git config --local pull.rebase true +# - name: Install dotnet-script +# run: | +# dotnet tool install -g dotnet-script +# dotnet script --version - # Perform a git pull to update the local branch with remote changes - git pull origin AssetStoreRelease +# - name: Run CreateRelease.cs +# run: | +# dotnet script .github/CreateRelease.cs - # Push the updated branch to the remote - git push origin AssetStoreRelease - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# - name: Commit and Push +# run: | +# git config --local user.name ${{ secrets.COMMITTER_NAME }} +# git config --local user.email ${{ secrets.COMMITTER_EMAIL }} +# git add Assets/Mirror/version.txt +# git commit -m "release!: Asset Store Release" -a + +# # Configure Git to rebase when pulling +# git config --local pull.rebase true + +# # Perform a git pull to update the local branch with remote changes +# git pull origin AssetStoreRelease + +# # Push the updated branch to the remote +# git push origin AssetStoreRelease +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cd7f1637f425a9cc22b820de7e86ebcc3d568f6e Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 9 Nov 2023 02:53:06 -0500 Subject: [PATCH 2/7] Updated CreateRelease.yml --- .github/workflows/CreateRelease.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index beef1819a..255a71789 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -9,16 +9,31 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set Git Config run: | git config user.name ${{ secrets.COMMITTER_NAME }} git config user.email ${{ secrets.COMMITTER_EMAIL }} + - name: Debug - List Branches + run: | + git branch -a + + - name: Check if AssetStoreRelease branch exists + run: | + if ! git show-ref --verify --quiet refs/heads/AssetStoreRelease; then + git checkout -b AssetStoreRelease + else + git checkout AssetStoreRelease + fi + + - name: Debug - List Files + run: | + ls -al + - name: Merge Master into AssetStoreRelease run: | - git checkout AssetStoreRelease git merge master git push From 49a1ef936e7877bb47d67a18ad190a3ad3b73b65 Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 9 Nov 2023 02:55:31 -0500 Subject: [PATCH 3/7] Updated CreateRelease.yml --- .github/workflows/CreateRelease.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 255a71789..b6e8fd7b1 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -22,11 +22,7 @@ jobs: - name: Check if AssetStoreRelease branch exists run: | - if ! git show-ref --verify --quiet refs/heads/AssetStoreRelease; then - git checkout -b AssetStoreRelease - else - git checkout AssetStoreRelease - fi + git checkout -b AssetStoreRelease - name: Debug - List Files run: | @@ -35,7 +31,7 @@ jobs: - name: Merge Master into AssetStoreRelease run: | git merge master - git push + git push --set-upstream origin AssetStoreRelease #jobs: # CreateRelease: From 66e0fa81cab0022803cadc3d01a9002fa1ed8ab3 Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 9 Nov 2023 03:01:17 -0500 Subject: [PATCH 4/7] Updated CreateRelease.yml --- .github/workflows/CreateRelease.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index b6e8fd7b1..396adcf71 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -15,18 +15,11 @@ jobs: run: | git config user.name ${{ secrets.COMMITTER_NAME }} git config user.email ${{ secrets.COMMITTER_EMAIL }} - - - name: Debug - List Branches - run: | - git branch -a - - - name: Check if AssetStoreRelease branch exists - run: | git checkout -b AssetStoreRelease - - name: Debug - List Files + - name: Pull latest changes from AssetStoreRelease run: | - ls -al + git pull origin AssetStoreRelease - name: Merge Master into AssetStoreRelease run: | From 6ed44b7d1b1700e4ee9d66e0a39f5e90e94b6c7f Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 9 Nov 2023 03:04:38 -0500 Subject: [PATCH 5/7] Updated CreateRelease.yml --- .github/workflows/CreateRelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index 396adcf71..a57361a6a 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -19,7 +19,7 @@ jobs: - name: Pull latest changes from AssetStoreRelease run: | - git pull origin AssetStoreRelease + git pull --strategy-option=theirs origin AssetStoreRelease - name: Merge Master into AssetStoreRelease run: | From c7e151a1288357515d9fe6e14440ee2112dfe12d Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 9 Nov 2023 03:20:54 -0500 Subject: [PATCH 6/7] Updated CreateRelease.yml --- .github/workflows/CreateRelease.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index a57361a6a..bd70bd271 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -15,16 +15,14 @@ jobs: run: | git config user.name ${{ secrets.COMMITTER_NAME }} git config user.email ${{ secrets.COMMITTER_EMAIL }} - git checkout -b AssetStoreRelease - - - name: Pull latest changes from AssetStoreRelease - run: | - git pull --strategy-option=theirs origin AssetStoreRelease - name: Merge Master into AssetStoreRelease run: | - git merge master - git push --set-upstream origin AssetStoreRelease + git fetch --unshallow + git checkout -b AssetStoreRelease + git pull + git merge --no-ff master -m "Merged master" + git push #jobs: # CreateRelease: From 5bc9f31b2bc0398407ac3651535a1786bb044b07 Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Thu, 9 Nov 2023 03:35:05 -0500 Subject: [PATCH 7/7] Updated CreateRelease --- .github/workflows/CreateRelease.yml | 31 +++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CreateRelease.yml b/.github/workflows/CreateRelease.yml index bd70bd271..a18bf4baa 100644 --- a/.github/workflows/CreateRelease.yml +++ b/.github/workflows/CreateRelease.yml @@ -11,18 +11,27 @@ jobs: - name: Checkout Repository uses: actions/checkout@v3 - - name: Set Git Config - run: | - git config user.name ${{ secrets.COMMITTER_NAME }} - git config user.email ${{ secrets.COMMITTER_EMAIL }} - - name: Merge Master into AssetStoreRelease - run: | - git fetch --unshallow - git checkout -b AssetStoreRelease - git pull - git merge --no-ff master -m "Merged master" - git push + uses: devmasx/merge-branch@master + with: + type: now + from_branch: master + target_branch: AssetStoreRelease + message: "Merged master" + github_token: ${{ secrets.GITHUB_TOKEN }} + + #- name: Set Git Config + # run: | + # git config user.name ${{ secrets.COMMITTER_NAME }} + # git config user.email ${{ secrets.COMMITTER_EMAIL }} + + #- name: Merge Master into AssetStoreRelease + # run: | + # git fetch --unshallow + # git checkout -b AssetStoreRelease + # git pull + # git merge --no-ff master -m "Merged master" + # git push #jobs: # CreateRelease: