Updates to correct subsitution syntax

This commit is contained in:
Neil Dorin
2020-03-18 13:24:08 -06:00
parent fc4d4ad6bb
commit a49f57208e

View File

@@ -58,17 +58,17 @@ jobs:
./.github/scripts/ZipBuildOutput.ps1 ./.github/scripts/ZipBuildOutput.ps1
- name: Write Version - name: Write Version
run: run:
Write-Output "VERSION = $($Env:VERSION)" | Out-File -FilePath ".\output\properties.txt" Write-Output "$($Env:VERSION)" | Out-File -FilePath ".\output\version.txt"
- name: Upload Build Output - name: Upload Build Output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: Build name: Build
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
- name: Upload properties.txt - name: Upload version.txt
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: Version name: Version
path: ./output/properties.txt path: ./output/version.txt
# - name: Create Release # - name: Create Release
# id: create_release # id: create_release
# uses: actions/create-release@v1 # uses: actions/create-release@v1
@@ -97,21 +97,22 @@ jobs:
with: with:
token: ${{ secrets.BUILDS_TOKEN }} token: ${{ secrets.BUILDS_TOKEN }}
repository: PepperDash-Engineering/pepperdash-core-builds repository: PepperDash-Engineering/pepperdash-core-builds
ref: $(Env:GITHUB_REF)
- name: Download Build Property Info - name: Download Build Property Info
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1
with: with:
name: Properties name: Version
- name: Check Directory - name: Check Directory
run: Get-ChildItem "./" run: Get-ChildItem "./"
- name: Set Version Number - name: Set Version Number
shell: powershell shell: powershell
run: | run: |
Get-ChildItem "./Properties" Get-ChildItem "./Properties"
$version = Get-Content -Path ./Version/properties.txt $version = Get-Content -Path ./Version/version.txt
Write-Host "Version: $version" Write-Host "Version: $version"
Write-Output "::set-env name=VERSION::$version" Write-Output "::set-env name=VERSION::$version"
Remove-Item -Path ./Properties/properties.txt Remove-Item -Path ./Version/version.txt
Remove-Item -Path ./Properties Remove-Item -Path ./Version
- name: Create new branch - name: Create new branch
run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/") run: git checkout -b $($Env:GITHUB_REF -replace "refs/heads/")
- name: Download Build output - name: Download Build output
@@ -124,23 +125,21 @@ jobs:
git config user.email "actions@pepperdash.com" git config user.email "actions@pepperdash.com"
git config user.name "GitHub Actions" git config user.name "GitHub Actions"
git add . git add .
$commit = "Build ${{ env.GITHUB_RUN_NUMBER }} from commit: https://github.com/${{ env.GITHUB_REPOSITORY }}/commit/${{ env.GITHUB_SHA }}" $commit = "Build $(Env:GITHUB_RUN_NUMBER) from commit: https://github.com/$(Env:GITHUB_REPOSITORY)/commit/$(Env:GITHUB_SHA)"
Write-Host $commit Write-Host $commit
git commit -m $commit git commit -m $commit
git tag ${{ env.VERSION }} git tag ${{ env:VERSION }}
git push --set-upstream origin $($Env:GITHUB_REF -Replace "refs/heads/") --force git push --set-upstream origin $($Env:GITHUB_REF -Replace "refs/heads/") --force
git push --tags origin 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 "./"
- name: Checkout Internal Builds Repo # - name: Checkout Internal Builds Repo
uses: actions/checkout@v2 # uses: actions/checkout@v2
with: # with:
token: ${{ secrets.BUILDS_TOKEN }} # token: ${{ secrets.BUILDS_TOKEN }}
repository: PepperDash-Engineering/pepperdash-core-builds # repository: PepperDash-Engineering/pepperdash-core-builds
ref: ${{ env.BRANCH }} # ref: $(Env:GITHUB_REF)
# - name: Download Build output # - name: Download Build output
# uses: actions/download-artifact@v1 # uses: actions/download-artifact@v1
# with: # with: