From c212f204ca17b0ebba92a16133e0ec928f53cd1b Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 10 Jun 2020 10:12:59 -0600 Subject: [PATCH 1/3] fix master.yml --- .github/workflows/master.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 7a6135c..01d66dd 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -59,11 +59,20 @@ jobs: - name: Zip Build Output shell: powershell run: ./.github/scripts/ZipBuildOutput.ps1 + # Write the version to a file to be consumed by the push jobs + - name: Write Version + run: Write-Output "$($Env:VERSION)" | Out-File -FilePath "$($Env:GITHUB_HOME)\output\version.txt" - name: Upload Build Output uses: actions/upload-artifact@v1 with: name: Build path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip + # Upload the Version file as an artifact + - name: Upload version.txt + uses: actions/upload-artifact@v1 + with: + name: Version + path: ${{env.GITHUB_HOME}}\output\version.txt # Upload the build package to the release - name: Upload Release Package id: upload_release From de9d44169a4af5b5164c7e9c78c7225b9db9db45 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 10 Jun 2020 11:43:12 -0600 Subject: [PATCH 2/3] fix push to repos jobs --- .github/workflows/master.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 01d66dd..81f7fa7 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -114,7 +114,7 @@ jobs: Remove-Item -Path ./Version # Checkout/Create the branch - name: Create new branch - run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/") + run: git checkout master # Download the build output into the repo - name: Download Build output uses: actions/download-artifact@v1 @@ -150,10 +150,7 @@ jobs: # Push the commit - name: Push to Builds Repo shell: powershell - run: | - $branch = $($Env:GITHUB_REF) -replace "refs/heads/" - Write-Host "Branch: $branch" - git push -u origin $($branch) --force + run: git push -u origin master --force # Push the tags - name: Push tags run: git push --tags origin @@ -191,7 +188,7 @@ jobs: Remove-Item -Path ./Version # Checkout/Create the branch - name: Create new branch - run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/") + run: git checkout master # Download the build output into the repo - name: Download Build output uses: actions/download-artifact@v1 @@ -227,10 +224,7 @@ jobs: # Push the commit - name: Push to Builds Repo shell: powershell - run: | - $branch = $($Env:GITHUB_REF) -replace "refs/heads/" - Write-Host "Branch: $branch" - git push -u origin $($branch) --force + run: git push -u origin master --force # Push the tags - name: Push tags run: git push --tags origin From 128e34ce50bbdccf621fcc00d5ed582142ffbe7b Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 10 Jun 2020 12:26:01 -0600 Subject: [PATCH 3/3] Update master.yml --- .github/workflows/master.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 81f7fa7..70f3444 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -160,7 +160,6 @@ jobs: Public_Push_Output: needs: Build_Project runs-on: windows-latest - if: contains(github.ref, 'master') || contains(github.ref, 'release') steps: # Checkout the repo - name: Checkout Builds Repo