Hello,
I’m new to circleci.
I’m trying to integrate it to release my lib to npm.
Right now I have created the config in .circleci/config.yml
What I need to do is to run some commands to build and release the lib after the test (that are already running).
this is my current config:
# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
version: 2.1
# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# See: https://circleci.com/docs/2.0/orb-intro/
orbs:
node: circleci/node@4.7
jobs:
release:
docker:
- image: alpine:3.7
steps:
- run:
name: install
command: npm install
- run:
name: cover
command: npm run cover
- run:
name: coverage:check
command: npm run coverage:check
- run:
name: build
command: npm run build
- run:
name: coverage:report
command: npm run coverage:report
- run:
name: semantic-release
command: npm run semantic-release
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
workflows:
release:
jobs:
- release
test: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- node/test:
# This is the node version to use for the `cimg/node` tag
# Relevant tags can be found on the CircleCI Developer Hub
# https://circleci.com/developer/images/image/cimg/node
version: "16.10"
# If you are using yarn, change the line below from "npm" to "yarn"
pkg-manager: npm
The first issue is that the jobs are running in parallel, but i want to do the release job after test.
The second issue is that though I used alpine image (that should already have npm installed) I get an error which cannot find npm and I’m unable to run my scripts
How can this be fixed?
Thank You