Skip to content

Commit

Permalink
ci: fix release process
Browse files Browse the repository at this point in the history
  • Loading branch information
shiki-tak committed Jul 6, 2021
1 parent 7fa0cb1 commit 876de45
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 36 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/changelog.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
run: echo ::set-output name=VERSION::${HEAD_REF#release-v}
env:
HEAD_REF: ${{ github.event.pull_request.head.ref }}
- name: Create new tag
run: ./generate_release_tag.sh ${{ steps.get_version.outputs.VERSION }}
- name: Install Docker client
run: |
apk add docker-cli
Expand Down
17 changes: 17 additions & 0 deletions devtools/generate_release_tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
command -v shellcheck >/dev/null && shellcheck "$0"

packages=("cosmwasm-crypto" "cosmwasm-derive" "cosmwasm-schema" "cosmwasm-std" "cosmwasm-storage" "cosmwasm-vm")

V=""

for ((i = 0; i < ${#packages[@]}; i++)) {
V=$(cargo tree -i "${packages[i]}" | grep -o -E "([0-9]+\.){1}[0-9]+(\.[0-9]+)-([0-9]+\.){1}[0-9]+(\.[0-9]+)?" | head -n1)
if [ "$1" != "$V" ]; then
echo "mismatch version"
exit 1
fi
}

git tag "$V"

0 comments on commit 876de45

Please sign in to comment.