You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- rename `semver.yml` workflow to a more general `pr-checks.yml`
- add a check that if the `breaking change` label is applied, the job
must contain a section called "Breaking change(s)"
if [[ "$breaking_change_label_count" == 1 ]]; then
36
+
echo "has-label=true" >> "$GITHUB_OUTPUT"
37
+
else
38
+
echo "has-label=false" >> "$GITHUB_OUTPUT"
39
+
fi
40
+
env:
41
+
GH_TOKEN: ${{ github.token }}
42
+
43
+
- name: Run semver-checks
44
+
run: |
45
+
if ! "$RUNNER_TEMP/cargo-semver-checks" semver-checks --baseline-rev "origin/$GITHUB_BASE_REF" ; then
46
+
# There were breaking changes. Make sure we have the appropriate label!
47
+
if [[ "${{ steps.check-breaking-label.outputs.has-label }}" != "true" ]]; then
48
+
echo "::error title=semver-checks::semver-checks found breaking changes, but the 'breaking change' label isn't applied. Please add that label."
49
+
exit 1
50
+
else
51
+
echo "::warning title=semver-checks::semver-checks found breaking changes. The 'breaking change' label is applied, so no action needed if this is an acceptable change."
0 commit comments