Skip to content

Commit

Permalink
feat: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
blujedis committed Jul 3, 2022
1 parent 776c6ba commit 29cde26
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 19 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main'}}
steps:
- uses: actions/checkout@main
- name: Setup Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npx semantic-release
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build application
run: npm run build --if-present
- name: Test application
run: npm test --if-present
- name: Create semantic release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.SERVICE_ACCT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_BLUREG }}
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint --edit
npx --no -- commitlint --edit ""
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"types": "tsc --emitDeclarationOnly",
"dev": "tsup --watch src & npm run types",
"docs": "rimraf docs/ && typedoc src/index.ts && touch ./docs/.nojekyll",
"test": "echo \"Warn: no test specified in vite-plugin-svelte-svgr\"",
"prepare": "husky install",
"prepublishOnly": "npm run build && npm run docs",
"semantic-release": "semantic-release --branches main"
Expand All @@ -61,11 +62,6 @@
"esm"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"dependencies": {
"@rollup/pluginutils": "^4.2.1",
"picomatch": "^2.3.1",
Expand All @@ -79,7 +75,7 @@
"semantic-release": "^19.0.3",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"husky": "^8.0.1",
"husky": "^8.0.0",
"typedoc": "^0.23.5",
"typescript": "^4.2.4",
"vite": "^2.9.13",
Expand All @@ -90,4 +86,4 @@
"svelte": "3.x",
"vite": "^2.9.13"
}
}
}
16 changes: 14 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 29cde26

Please sign in to comment.