File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 99 tag :
1010 description : " Tag for new version (1.23.4)"
1111 required : true
12+ skip_deps_check :
13+ type : boolean
14+ description : " Skip dependencies version check (you can skip only when creating non-release tags)"
15+ default : false
1216 release_notes :
1317 type : boolean
1418 description : " Create draft release notes"
7377 echo "tag_no_v=${TAG}" >> "$GITHUB_OUTPUT"
7478 fi
7579
80+ - name : Validate API and SDK dependencies
81+ env :
82+ SKIP_CHECK : ${{ github.event.inputs.skip_deps_check }}
83+ TAG : ${{ steps.new_version.outputs.tag_with_v }}
84+ run : |
85+ SEMVER_RE='^v[0-9]+\.[0-9]+\.[0-9]+$'
86+
87+ if [[ "$SKIP_CHECK" == "true" ]]; then
88+ if [[ ! "$TAG" =~ $SEMVER_RE ]]; then
89+ echo "::notice::Skipping dependencies check"
90+ exit 0
91+ fi
92+ echo "::warning::Cannot skip dependencies check when creating a potential release tag $TAG"
93+ fi
94+
95+ MODULES=( "go.temporal.io/api" "go.temporal.io/sdk" )
96+ for module in "${MODULES[@]}"; do
97+ version=$(go list -f '{{.Version}}' -m "$module")
98+ if [[ ! "$version" =~ $SEMVER_RE ]]; then
99+ echo "::error::Using non-tagged version of module $module with version $version"
100+ exit 1
101+ fi
102+ replace=$(go list -f '{{.Replace}}' -m "$module")
103+ if [[ "$replace" != "<nil>" ]]; then
104+ echo "::error::Module $module is replaced with $replace"
105+ exit 1
106+ fi
107+ done
108+
76109 - name : Update Server version
77110 if : ${{ steps.get_current_version.outputs.CURRENT_VERSION != github.event.inputs.tag }}
78111 env :
You can’t perform that action at this time.
0 commit comments