Skip to content

Commit

Permalink
add codeowners and formatting check
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Dec 11, 2024
1 parent f64c952 commit ce488a7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @silinternational/js-devs
18 changes: 18 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ jobs:
with:
node-version: "20"
- run: npm ci
- name: Check formatting
run: |
set -eo pipefail
files_to_format=$(npm run format:check --silent || true)
if [ -n "$files_to_format" ]; then
echo "The following files are not formatted correctly:"
echo "$files_to_format"
{
echo "formatted_files<<EOF"
echo "$files_to_format"
echo "EOF"
echo "formatting_needed=true"
} >> $GITHUB_OUTPUT
exit 1
else
echo "All files are formatted correctly."
echo "formatting_needed=false" >> $GITHUB_OUTPUT
fi
- run: npm test
- uses: JS-DevTools/npm-publish@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"svelte": "index.mjs",
"scripts": {
"test": "echo test",
"format-all": "npx prettier --write .",
"format-all": "prettier --write .",
"format:check": "prettier --list-different .",
"dev": "sass components/global.scss components/global.css; storybook dev -p 6007",
"build": "sass components/global.scss components/global.css; storybook build",
"dry": "npx semantic-release --dry-run",
Expand Down

0 comments on commit ce488a7

Please sign in to comment.