diff --git a/README.md b/README.md index 4e39869..b47f686 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ jobs: | retry | **Optional** | How many times retrying if upload fails. `3` by default. | | post_command | **Optional** | Extra command that will be executed for teardown work. e.g. you can use it to upload artifacts to AWS s3 or aliyun OSS | | compress_assets | **Optional** | Upload execuable binaries rather than `.tar.gz` or `.zip` package. | +| zip_assets | **Optional** | Upload executable binaries published in a `.zip` package. `FALSE` by default. | ### Advanced Example diff --git a/action.yml b/action.yml index 768ba56..3c23c90 100644 --- a/action.yml +++ b/action.yml @@ -91,6 +91,10 @@ inputs: description: 'Compress assets before uploading' required: false default: 'TRUE' + zip_assets: + description: 'Produce zip file assets for all platforms' + required: false + default: 'FALSE' runs: using: 'docker' @@ -117,6 +121,7 @@ runs: - ${{ inputs.retry }} - ${{ inputs.post_command }} - ${{ inputs.compress_assets }} + - ${{ inputs.zip_assets }} branding: icon: 'package' diff --git a/release.sh b/release.sh index 767ac32..7110e2d 100755 --- a/release.sh +++ b/release.sh @@ -109,7 +109,7 @@ if [ ${INPUT_COMPRESS_ASSETS^^} == 'TRUE' ]; then RELEASE_ASSET_EXT='.tar.gz' MEDIA_TYPE='application/gzip' RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT} - if [ ${INPUT_GOOS} == 'windows' ]; then + if [ ${INPUT_GOOS} == 'windows' || ${INPUT_ZIP_ASSETS} == 'TRUE' ]; then RELEASE_ASSET_EXT='.zip' MEDIA_TYPE='application/zip' RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT}