Skip to content

Commit

Permalink
Merge pull request #169 from WillAbides/action17
Browse files Browse the repository at this point in the history
validate_go_module
  • Loading branch information
WillAbides authored Jun 9, 2023
2 parents 522af7c + 1dab3b1 commit 915bd4b
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,10 @@ jobs:
${{ steps.setup-go.outputs.GOMODCACHE }}
key: ${{ runner.os }}-go-release-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-release
- uses: WillAbides/release-train@v1.6.1
- uses: WillAbides/release-train@v1.7.0
with:
create_release: true
validate_version: |
set -e
MODULE_VERSION_SUFFIX="$(go list -m | grep -o '/v[0-9][0-9]*$' || true)"
MAJOR_VERSION="${RELEASE_VERSION%%.*}"
if [ "$MAJOR_VERSION" -ge 2 ] && [ "$MODULE_VERSION_SUFFIX" != "/v$MAJOR_VERSION" ]; then
echo "module version suffix must be /v$MAJOR_VERSION"
exit 1
elif [ "$MAJOR_VERSION" -lt 2 ] && [ -n "$MODULE_VERSION_SUFFIX" ]; then
echo "Module name must not end with /v[0-9][0-9]*"
exit 1
fi
validate_go_module: "."
post_release_hook: |
set -e
script/bindown install goreleaser
Expand Down

0 comments on commit 915bd4b

Please sign in to comment.