chore(npm-publish): add a build step to the workflow before publish #11
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: Xarvis CLI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📚 Git Checkout | |
uses: actions/checkout@v4 | |
- name: 🚀 Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: 🚧 Install Dependencies | |
run: npm install | |
- name: 🎯 Check Formatting | |
run: npm run lint | |
- name: ⚒️ Build | |
run: npm run build --if-present | |
- name: 🧪 Run tests | |
run: npm run test |