Hello everyone !
I know this issue has been mentioned in a lot of topics but unfortunately I haven’t found a solution in any of them.
I’ve configured my circleci.yml to publish my npm package when a new tag is created but circleci does not seem to detect it.
Here is my configuration:
version: 2.1
defaults: &defaults
working_directory: ~/repo
docker:
- image: circleci/node:12.14.1
orbs:
codecov: codecov/codecov@1.0.5
jobs:
build:
<<: *defaults
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: yarn test
- codecov/upload:
file: {{ coverage_report_filepath }}
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run:
name: Publish package
command: yarn release
workflows:
version: 2
build-and-deploy:
jobs:
- build:
filters:
tags:
only: /.*/
- deploy:
requires:
- build
filters:
tags:
only: /^\d+\.\d+\.\d+(-pre\.\d+)?$/
branches:
ignore: /.*/
To add more informations, the repo is hosted on github and the tag I pushed was the following: 0.0.1-pre.1
I’m running out of options so, I one of you could find out the solution it would be great !
Thank you in advance !