diff --git a/.github/workflows/changeset-enforce.yml b/.github/workflows/changeset-enforce.yml new file mode 100644 index 00000000000..70f1cbb48cc --- /dev/null +++ b/.github/workflows/changeset-enforce.yml @@ -0,0 +1,28 @@ +name: No patch level changesets +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + check_changesets: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + fetch-depth: 0 + + - name: Check for patch level changesets + run: | + if grep -q ': patch' .changeset/*.json; then + echo "Patch level changesets are reserved for hotfixes, use major or minor only." + exit 1 + else + echo "No patch level changesets found." + fi \ No newline at end of file