chore: fix pipeline #2
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: Build and publish | |
on: | |
push: | |
branches: | |
- main | |
# pull_request: | |
# branches: | |
# - main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install | |
- name: Run lint | |
run: npm run lint | |
- name: Run tests | |
run: npm run coverage | |
- name: Build project | |
run: npm run build | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npm run release |