adds copying build output and pushing to builds repo

This commit is contained in:
Andrew Welker
2020-03-17 18:11:23 -06:00
parent 67e1507f07
commit 72fb11b790

View File

@@ -97,7 +97,6 @@ jobs:
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: Build name: Build
path: ./build.zip
- name: Download Version Info - name: Download Version Info
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
@@ -113,6 +112,19 @@ jobs:
Write-Output "::set-env name=VERSION::$version" Write-Output "::set-env name=VERSION::$version"
Remove-Item -Path ./Version/version.txt Remove-Item -Path ./Version/version.txt
Remove-Item -Path ./Version Remove-Item -Path ./Version
- name: Copy build output and push
run: |
$branch = $(${{ env.GITHUB_REF }}) -Replace "refs/heads/";
git checkout -b $branch
Get-ChildItem -Path "./Build" | Copy-Item -Path ./
Remove-Item -Path ./Build -Recurse
git add .
git commit -m "Build ${{ env.GITHUB_RUN_NUMBER }} from commit: https://github.com/${{ env.GITHUB_REPOSITORY }}/commit/${{ env.GITHUB_SHA }}"
git tag ${{ env.VERSION }}
git push --set-upstream origin +$branch --force
git push --tags origin
# "Build #${SOURCE_BUILD_NUMBER} from commit: https://github.com/PepperDash/PepperDashCore/commit/${COMMIT}"
- name: Check Directory - name: Check Directory
run: | run: |
Get-ChildItem "./" Get-ChildItem "./"