fix: fix dependency error #133
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: "cli: build+publish" | |
on: | |
push: | |
branches-ignore: | |
- "master" | |
paths: | |
- "packages/cli/**" | |
jobs: | |
build-publish: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18.12" | |
registry-url: "https://registry.npmjs.org" | |
scope: "@bisonai" | |
always-auth: true | |
- name: Install dependencies | |
run: yarn workspace @bisonai/orakl-cli install | |
- name: Run lint | |
run: yarn workspace @bisonai/orakl-cli lint --fix | |
- name: Build package | |
run: yarn workspace @bisonai/orakl-cli build | |
- name: Extract version from package.json | |
uses: sergeysova/jq-action@v2 | |
id: packageJsonVersion | |
with: | |
cmd: "jq .version ./packages/cli/package.json -r" | |
- name: Extract version from the latest published package | |
id: npmPackageVersion | |
run: echo "VERSION=`npm view @bisonai/orakl-cli version`" >> $GITHUB_OUTPUT | |
- name: Publish package | |
if: steps.packageJsonVersion.outputs.value != steps.npmPackageVersion.outputs.VERSION | |
run: yarn workspace @bisonai/orakl-cli publish --new-version ${{ steps.packageJsonVersion.outputs.value }} --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |