-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: validate contracts changeset files (#15468)
* feat: validate contracts changeset files * fix: remove explicit passing of github token
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,3 +162,42 @@ jobs: | |
run: | | ||
echo "Please include at least one tag in the core changeset file" | ||
exit 1 | ||
contracts-changeset: | ||
name: Contracts Changeset Checker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | ||
id: files-changed | ||
with: | ||
predicate-quantifier: every | ||
list-files: shell | ||
filters: | | ||
contracts-changeset: | ||
- added|modified: 'contracts/.changeset/*.md' | ||
- name: Setup node | ||
uses: ./.github/actions/setup-node | ||
if: ${{ steps.files-changed.outputs.contracts-changeset == 'true' }} | ||
|
||
- name: Validate changeset files | ||
if: ${{ steps.files-changed.outputs.contracts-changeset == 'true' }} | ||
working-directory: contracts | ||
run: | | ||
pnpm changeset version | ||
- name: Comment Failure | ||
if: ${{ failure() && steps.files-changed.outputs.contracts-changeset == 'true' }} | ||
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
message: | | ||
It appears that the changeset file you've added or modified in `contracts/.changeset` is not valid. | ||
Please delete the file and run `pnpm changeset` in the contracts directory. | ||