Skip to content

Commit

Permalink
feat: using the Optic servers when publishing to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
Pehesi97 committed Sep 12, 2023
1 parent 451781b commit f470ff7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
registry-url: "https://registry.npmjs.org"

- run: |
cd npm && npm ci && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
cd npm
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm ci
otp=(curl -s \
-d '{ "packageInfo": { "version": "$(cat package.json | jq -r '.version')", "name": "$(cat package.json | jq -r '.name')" } }' \
-H "Content-Type: application/json" \
-X POST \
${{ secrets.OPTIC_URL }}${{ secrets.OPTIC_TOKEN }})
npm publish --otp ${otp}

0 comments on commit f470ff7

Please sign in to comment.