Skip to content

Commit

Permalink
chore(npm): run build only after checking if the version already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
naftis committed Nov 5, 2024
1 parent 805f928 commit 5f9a420
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ jobs:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org/"

- name: Install dependencies
run: yarn install
working-directory: packages/country-config

- name: Build
run: yarn build
working-directory: packages/country-config

- name: Check if version exists on npm
id: check-version
run: |
Expand All @@ -41,6 +33,14 @@ jobs:
fi
working-directory: packages/country-config

- name: Install dependencies
run: yarn install
working-directory: packages/country-config

- name: Build
run: yarn build
working-directory: packages/country-config

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

0 comments on commit 5f9a420

Please sign in to comment.