Skip to content

Commit

Permalink
Add support to produce zip files for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmayer committed Sep 13, 2022
1 parent a348b53 commit 18e8043
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Expand Up @@ -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'
Expand All @@ -117,6 +121,7 @@ runs:
- ${{ inputs.retry }}
- ${{ inputs.post_command }}
- ${{ inputs.compress_assets }}
- ${{ inputs.zip_assets }}

branding:
icon: 'package'
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Expand Up @@ -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}
Expand Down

0 comments on commit 18e8043

Please sign in to comment.