Add workflow and missing dependencies #11
Workflow file for this run
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: CICD | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ['*'] | |
jobs: | |
build: | |
name: CICD | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
cache: pnpm | |
registry-url: https://registry.npmjs.org | |
- name: Install modules | |
run: | | |
pnpm install | |
- name: Check format and lint | |
run: | | |
pnpm run format:check | |
pnpm run lint | |
# TODO: tests | |
- name: Build project | |
run: pnpm run build | |
- name: Update version | |
run: pnpm version prerelease --preid=dev-${GITHUB_SHA::6} --no-git-tag-version | |
- name: Publish to npmjs | |
run: pnpm publish --access public --no-git-checks --tag dev | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.BITTE_AI_NPM_TOKEN }} | |
# TODO: manual tagged releases |