updated build-go-packages.yml

pull/10/head^2
Nikita Bykov 5 years ago
parent d7cde8ccbd
commit dddb2abf8e

@ -13,7 +13,6 @@ on:
env: env:
VERSION: ${{ github.event.inputs.VERSION }} VERSION: ${{ github.event.inputs.VERSION }}
ARCHITECTURE: x64
jobs: jobs:
build_go: build_go:
@ -31,11 +30,10 @@ jobs:
submodules: true submodules: true
- name: Build Go ${{ env.VERSION }} - name: Build Go ${{ env.VERSION }}
shell: pwsh
run: | run: |
./builders/build-go.ps1 -Version $env:VERSION ` ./builders/build-go.ps1 -Version $env:VERSION `
-Platform ${{ matrix.platform }} ` -Platform ${{ matrix.platform }}
-Architecture $env:ARCHITECTURE
shell: pwsh
- name: Publish artifact - name: Publish artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
@ -47,6 +45,9 @@ jobs:
name: Test Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}] name: Test Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}]
needs: build_go needs: build_go
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
defaults:
run:
shell: pwsh
env: env:
ARTIFACT_NAME: go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64 ARTIFACT_NAME: go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64
strategy: strategy:
@ -66,7 +67,6 @@ jobs:
- name: Fully cleanup the toolcache directory before testing - name: Fully cleanup the toolcache directory before testing
run: ./helpers/clean-toolcache.ps1 -ToolName "go" run: ./helpers/clean-toolcache.ps1 -ToolName "go"
shell: pwsh
- name: Download artifact - name: Download artifact
uses: actions/download-artifact@v2 uses: actions/download-artifact@v2
@ -83,13 +83,11 @@ jobs:
tar -xzf $artifactName tar -xzf $artifactName
} }
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }} working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
shell: pwsh
- name: Apply build artifact to the local machine - name: Apply build artifact to the local machine
run: | run: |
if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh } if ('${{ matrix.platform }}' -eq 'win32') { powershell ./setup.ps1 } else { sh ./setup.sh }
working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }} working-directory: ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
shell: pwsh
- name: Setup Go ${{ env.VERSION }} - name: Setup Go ${{ env.VERSION }}
uses: actions/setup-go@v2.1.1 uses: actions/setup-go@v2.1.1
@ -104,7 +102,6 @@ jobs:
Write-Host "to determine if Go.js version was consumed from cache and was downloaded" Write-Host "to determine if Go.js version was consumed from cache and was downloaded"
Write-Host "Random values:" Write-Host "Random values:"
for ($i = 0; $i -lt 200; $i++) { Get-Random } for ($i = 0; $i -lt 200; $i++) { Get-Random }
shell: pwsh
- name: Run tests - name: Run tests
run: | run: |
@ -118,7 +115,6 @@ jobs:
} }
Invoke-Pester -Script $pesterParams -EnableExit Invoke-Pester -Script $pesterParams -EnableExit
working-directory: ./tests working-directory: ./tests
shell: pwsh
publish_release: publish_release:
name: Publish release name: Publish release

Loading…
Cancel
Save