zip "$RELEASE_LinuxAMD64".zip "$RELEASE_LinuxAMD64"
zip "$RELEASE_LinuxARM64".zip "$RELEASE_Linux386"
zip "$RELEASE_LinuxARM".zip "$RELEASE_LinuxARM"
zip "$RELEASE_OSX".zip "$RELEASE_OSX"
- name:Create Release
id:create_release
uses:monkeyWie/create-release@master
env:
GOOS:${{ matrix.goos }}
GOARCH:${{ matrix.arch }}
CGO_ENABLED:1
- uses:svenstaro/upx-action@v2
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
with:
args:${{ matrix.args }}
file:${{ matrix.bin }}
- name:Upload to artifacts
uses:actions/upload-artifact@v2
tag_name:${{ github.ref }}
release_name:Release ${{ github.ref }}
draft:false
prerelease:true
- name:Upload Release - Windows 64bit
uses:actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
with:
name:${{ env.RELEASE }}
path:${{ matrix.bin }}
package:
name:Package Assets
runs-on:ubuntu-latest
needs:build
steps:
- uses:actions/checkout@v2
- uses:actions/download-artifact@v2
upload_url:${{ steps.create_release.outputs.upload_url }}# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path:./${{ env.RELEASE_WIN64 }}.zip
asset_name:${{ env.RELEASE_WIN64 }}.zip
asset_content_type:application/zip
- name:Upload Release - Windows 32bit
uses:actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
with:
path:bin
- name:Package Releases
run:|
mkdir releases;
for RELEASE_DIR in bin/*
do
echo "Creating release $RELEASE_DIR"
for BINARY in $RELEASE_DIR/*
do
chmod 777 $BINARY;
cp $BINARY .;
zip -r releases/$(basename $RELEASE_DIR).zip \
$(basename ${BINARY}) \
README.md \
README_ZH.md;
rm $BINARY;
done
done
- name:Upload to artifacts
uses:actions/upload-artifact@v2
upload_url:${{ steps.create_release.outputs.upload_url }}# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path:./${{ env.RELEASE_WIN32 }}.zip
asset_name:${{ env.RELEASE_WIN32 }}.zip
asset_content_type:application/zip
- name:Upload Release - Linux amd64
uses:actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
with:
name:releases
path:releases/*.zip
upload_url:${{ steps.create_release.outputs.upload_url }}# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path:./${{ env.RELEASE_LinuxAMD64 }}.zip
asset_name:${{ env.RELEASE_LinuxAMD64 }}.zip
asset_content_type:application/zip
upload:
name:Upload to the Release
runs-on:ubuntu-latest
needs:package
steps:
- uses:actions/download-artifact@v2
- name:Upload Release - Linux 386
uses:actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
with:
name:releases
path:releases/
- name:Upload Archives to Release
upload_url:${{ steps.create_release.outputs.upload_url }}# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url:${{ steps.create_release.outputs.upload_url }}# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url:${{ steps.create_release.outputs.upload_url }}# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path:./${{ env.RELEASE_LinuxARM }}.zip
asset_name:${{ env.RELEASE_LinuxARM }}.zip
asset_content_type:application/zip
- name:Upload Release - Darwin amd64
uses:actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}
with:
upload_url:${{ steps.create_release.outputs.upload_url }}# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps