File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed
Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,11 @@ name: Add Release Assets
33on :
44 release :
55 types : [published]
6-
6+ workflow_dispatch :
7+ inputs :
8+ tag :
9+ description : ' Tag to generate documentation for'
10+ required : false
711jobs :
812 asset :
913 runs-on : ${{ matrix.operating-system }}
1822 name : Get Tag
1923 run : echo ::set-output name=tag::${GITHUB_REF#refs/*/}
2024
21- - name : Get release
22- id : get_release
23- uses :
bruceadams/[email protected] 24- env :
25- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26-
2725 - name : Checkout
2826 uses : actions/checkout@v2
2927
@@ -50,14 +48,11 @@ jobs:
5048 zip -d ${fileName} "tests*" || true &&
5149 zip -d ${fileName} "examples*" || true
5250 env :
53- fileName : google-api-php-client-${{ steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip
51+ fileName : google-api-php-client-${{ inputs.tag || steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip
5452
5553 - name : Upload Release Archive
56- uses : actions/upload-release-asset@v1
57- env :
58- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
54+ uses : softprops/action-gh-release@v2
55+ if : github.ref_type == 'tag'
5956 with :
60- upload_url : ${{ steps.get_release.outputs.upload_url }}
61- asset_path : ./google-api-php-client-${{ steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip
62- asset_name : google-api-php-client-${{ steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip
63- asset_content_type : application/zip
57+ files : |
58+ ./google-api-php-client-${{ inputs.tag || steps.tagName.outputs.tag }}-PHP${{ matrix.php }}.zip
You can’t perform that action at this time.
0 commit comments