Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Publish to npm before packaging for github
Browse files Browse the repository at this point in the history
  • Loading branch information
robbytaylor committed Oct 2, 2019
1 parent 50320e7 commit 77d12c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
30 changes: 9 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ jobs:
- run:
name: Install dependencies
command: npm install
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/cli/.npmrc
- run:
name: Publish package
command: npm publish
- run:
name: Remove .npmrc
command: rm .npmrc
- run: npm run prepack
- run: npx @oclif/dev-cli pack -t linux-x64
- run: npx @oclif/dev-cli pack:deb
Expand Down Expand Up @@ -59,19 +68,6 @@ jobs:
- run: ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/deb/
- run: ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./dist/s3audit*

publish-to-npm:
docker:
- image: node:10.15.3
steps:
- attach_workspace:
at: ~/cli
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/cli/.npmrc
- run:
name: Publish package
command: npm publish ~/cli

workflows:
version: 2
"test":
Expand Down Expand Up @@ -101,11 +97,3 @@ workflows:
only: /^v.*/
branches:
ignore: /.*/
- publish-to-npm:
requires:
- pack
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "s3audit",
"version": "1.0.4",
"version": "1.0.5",
"author": "Rob Taylor @robbytaylor",
"bin": {
"s3audit": "./bin/run"
Expand Down

0 comments on commit 77d12c4

Please sign in to comment.