1010 description : ' Whether to publish releases'
1111 required : true
1212 default : ' false'
13+ pull_request :
14+ paths-ignore :
15+ - ' versions-manifest.json'
16+ - ' LICENSE'
17+ - ' **.md'
18+ branches :
19+ - ' main'
1320
1421env :
15- VERSION : ${{ github.event.inputs.VERSION }}
22+ VERSION : ${{ github.event.inputs.VERSION || '1.15.3' }}
1623defaults :
1724 run :
1825 shell : pwsh
1926
2027jobs :
2128 build_go :
22- name : Build Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}]
29+ name : Build Go ${{ github.event.inputs.VERSION || '1.15.3' }} [${{ matrix.platform }}]
2330 runs-on : ubuntu-latest
2431 env :
25- ARTIFACT_NAME : go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64
32+ ARTIFACT_NAME : go-${{ github.event.inputs.VERSION || '1.15.3' }}-${{ matrix.platform }}-x64
2633 strategy :
2734 fail-fast : false
2835 matrix :
@@ -44,11 +51,11 @@ jobs:
4451 path : ${{ runner.temp }}/artifact
4552
4653 test_go :
47- name : Test Go ${{ github.event.inputs.VERSION }} [${{ matrix.platform }}]
54+ name : Test Go ${{ github.event.inputs.VERSION || '1.15.3' }} [${{ matrix.platform }}]
4855 needs : build_go
4956 runs-on : ${{ matrix.os }}
5057 env :
51- ARTIFACT_NAME : go-${{ github.event.inputs.VERSION }}-${{ matrix.platform }}-x64
58+ ARTIFACT_NAME : go-${{ github.event.inputs.VERSION || '1.15.3' }}-${{ matrix.platform }}-x64
5259 strategy :
5360 fail-fast : false
5461 matrix :
8996 working-directory : ${{ runner.temp }}/${{ env.ARTIFACT_NAME }}
9097
9198 - name : Setup Go ${{ env.VERSION }}
92- uses : actions/setup-go@v2.1.1
99+ uses : actions/setup-go@v2.1.3
93100 with :
94101 go-version : ${{ env.VERSION }}
95102
@@ -110,7 +117,7 @@ jobs:
110117
111118 publish_release :
112119 name : Publish release
113- if : github.event.inputs.PUBLISH_RELEASES == 'true'
120+ if : github.event_name == 'workflow_dispatch' && github. event.inputs.PUBLISH_RELEASES == 'true'
114121 needs : test_go
115122 runs-on : ubuntu-latest
116123 steps :
0 commit comments