Skip to content

Commit

Permalink
refactor: add check for existence of dist and types directories befor…
Browse files Browse the repository at this point in the history
…e npm publish
  • Loading branch information
gabriel-logan committed Oct 4, 2024
1 parent 667368d commit 2e0e2cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: yarn install
- run: yarn build
- name: Check if dist and types directories exist
run: |
if [ ! -d "dist" ]; then
echo "Error: dist directory does not exist."
exit 1
fi
if [ ! -d "types" ]; then
echo "Error: types directory does not exist."
exit 1
fi
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-translator-code",
"version": "1.1.7",
"version": "1.1.8",
"description": "Azure Cognitive Services Translator Text API Code for Use with Common Languages",
"author": {
"name": "Gabriel Logan"
Expand Down

0 comments on commit 2e0e2cb

Please sign in to comment.