Merge pull request #2 from sajaghori/chore_svelte-4-support #47
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
name: run tests & bump version & publish to npm | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'chore')" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 7.1.9 | |
- name: install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.15.1 | |
cache: 'pnpm' | |
- run: pnpm install --no-save | |
- name: run linting | |
run: pnpm lint | |
- name: run tests | |
run: pnpm test | |
- name: bump version and create tag | |
uses: 'phips28/gh-action-bump-version@master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
minor-wording: 'feat' | |
major-wording: 'major' | |
- name: build app | |
run: pnpm build | |
- name: package lib | |
run: pnpm package | |
- name: publish to npm | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: ./package/package.json |