Skip to content

Commit

Permalink
🧹 chore: try to show publish step as skipped if it was skipped (?)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bottie McBotface committed Jan 9, 2025
1 parent 5d6d17d commit fc06cf5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,17 @@ jobs:
- uses: actions/checkout@v4

- name: Publish package
run: npx jsr publish
id: publish
run: |
OUTPUT=$(npx jsr publish 2>&1)
echo "$OUTPUT"
if echo "$OUTPUT" | grep -q "Skipping, already published"; then
echo "SKIPPED=true" >> $GITHUB_OUTPUT
else
echo "SKIPPED=false" >> $GITHUB_OUTPUT
fi
- name: Check if skipped
if: steps.publish.outputs.SKIPPED == 'true'
run: exit 78 # old way to mark a job as skipped

0 comments on commit fc06cf5

Please sign in to comment.