Skip to content

Commit

Permalink
Fix compress_assets for compatibility (#95)
Browse files Browse the repository at this point in the history
* fix: breaking change

* chore: test options for compress_assets, remove too many go version checking

* fix: typo
  • Loading branch information
wangyoucao577 committed Sep 24, 2022
1 parent bb9ce74 commit f4adb3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/autotest.yml
Expand Up @@ -75,7 +75,7 @@ jobs:
goos: [linux]
goarch: [amd64]
# "" means default
goversion: ["", "1.13", "1.14", "1.15", "1.16", "1.17", "1.18", "https://golang.org/dl/go1.16.1.linux-amd64.tar.gz"]
goversion: ["", "1.17", "1.18", "1.19", "https://golang.org/dl/go1.16.1.linux-amd64.tar.gz"]
steps:
# - name: Wait release docker build for release branches
# if: contains(github.ref, 'release')
Expand Down Expand Up @@ -130,13 +130,14 @@ jobs:
release_tag: v0.1-test-assets
asset_name: testmain-via-makefile-${{ matrix.goos }}-${{ matrix.goarch }}

compress-assets-off-test:
compress-assets-test:
name: Compress assets off Test
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: [amd64]
compress_assets: ['auto', 'true', 'zip', 'off', 'false']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -152,4 +153,4 @@ jobs:
build_flags: -v
overwrite: true
release_tag: v0.1-test-assets
compress_assets: false
compress_assets: ${{ matrix.compress_assets }}
2 changes: 1 addition & 1 deletion release.sh
Expand Up @@ -118,7 +118,7 @@ if [ ${INPUT_COMPRESS_ASSETS^^} == "TRUE" ] || [ ${INPUT_COMPRESS_ASSETS^^} == "
else
( shopt -s dotglob; tar cvfz ${RELEASE_ASSET_FILE} * )
fi
elif [ ${INPUT_COMPRESS_ASSETS^^} == "OFF" ]; then
elif [ ${INPUT_COMPRESS_ASSETS^^} == "OFF" ] || [ ${INPUT_COMPRESS_ASSETS^^} == "FALSE" ]; then
RELEASE_ASSET_EXT=${EXT}
MEDIA_TYPE="application/octet-stream"
RELEASE_ASSET_FILE=${RELEASE_ASSET_NAME}${RELEASE_ASSET_EXT}
Expand Down

0 comments on commit f4adb3e

Please sign in to comment.