Skip to content

Commit

Permalink
test what happens without checking if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
naftis committed Nov 5, 2024
1 parent fe1e0cc commit f7c8212
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,11 @@ jobs:
run: yarn build
working-directory: packages/country-config

- name: Check if version exists on npm
id: check-version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if npm view @opencrvs/mosip@$PACKAGE_VERSION > /dev/null 2>&1; then
echo "Version $PACKAGE_VERSION already exists on npm."
exit 0
else
echo "Version $PACKAGE_VERSION does not exist on npm."
fi
working-directory: packages/country-config

- name: Authenticate to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
working-directory: packages/country-config

- name: Publish to npm
if: steps.check-version.outputs.version-exists == 'false'
run: npm publish --access public
working-directory: packages/country-config
env:
Expand Down
3 changes: 3 additions & 0 deletions packages/country-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @opencrvs/mosip

This package contains helpers to country-config for using the [OpenCRVS-MOSIP API](https://github.com/opencrvs/mosip).

0 comments on commit f7c8212

Please sign in to comment.