Skip to content

Commit

Permalink
ci: add artifact versions to github releases
Browse files Browse the repository at this point in the history
  • Loading branch information
kerber0x authored Dec 19, 2023
2 parents 6472475 + 8a187b4 commit 91f3417
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/release-artifacts-on-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
run: |
$GITHUB_WORKSPACE/scripts/build_release.sh
tar -zcvf cosmwasm-artifacts.tar.gz artifacts
- name: Get Artifacts Versions
run: $GITHUB_WORKSPACE/scripts/get_artifacts_versions.sh > artifact_versions.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: cosmwasm-artifacts.tar.gz
files: |
cosmwasm-artifacts.tar.gz
artifact_versions.txt
2 changes: 1 addition & 1 deletion scripts/check_artifacts_size.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi
echo -e "\nChecking generated wasm artifacts file size...\n"
for artifact in artifacts/*.wasm; do
artifactSize=$(du -k "$artifact" | cut -f 1)
echo "$(basename $artifact): $artifactSize kB"
printf "%-35s %s\n" "$(basename $artifact)" ": $artifactSize kB"
if [ "$artifactSize" -gt $maximumSize ]; then
echo "Artifact $(basename $artifact) file size exceeded. Found $artifactSize kB, maximum $maximumSize kB"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/get_artifacts_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ for artifact in artifacts/*.wasm; do
version=$(cat ''"$contract_path"'/Cargo.toml' | awk -F= '/^version/ { print $2 }')
version="${version//\"/}"

printf "%-20s %s\n" "$(basename $artifact)" ":$version"
printf "%-25s %s\n" "$(basename $artifact)" ": $version"
done
echo -e "\n"

0 comments on commit 91f3417

Please sign in to comment.