Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,21 @@ jobs:

- run: deno run -A tasks/build-npm.ts ${{matrix.workspace}}

- name: Check if Published
id: checkIfPublished
run: |
PACKAGE="${{ matrix.name }}@${{ matrix.version }}"

if npm view "$PACKAGE" version 2>/dev/null; then
echo "$PACKAGE exists, publishing will be skipped"
echo "publish=false" >> $GITHUB_OUTPUT
else
echo "$PACKAGE not found, will attempt to publish"
echo "publish=true" >> $GITHUB_OUTPUT
fi

- run: npm publish --access=public --tag=latest
if: steps.checkIfPublished.outputs.publish == 'true'
working-directory: ${{matrix.workspace}}/build/npm

tag:
Expand Down