Skip to content

Commit 48225ab

Browse files
committed
fixing release (again)
1 parent 6a11f4c commit 48225ab

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/create-release-and-trigger-publish.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,20 @@ jobs:
4444
id: set-output
4545
run: echo "created=true" >> $GITHUB_ENV
4646
trigger-publish:
47-
needs: [check-tag, create-release]
47+
needs: [check-tag]
4848
runs-on: ubuntu-latest
49-
if: (needs.check-tag.outputs.tag_exists == 'true' && needs.create-release.result == 'skipped') || needs.create-release.result == 'success'
49+
if: always()
5050
steps:
51-
# ...
51+
- name: Determine whether to publish
52+
run: |
53+
if [ "${{ needs.check-tag.outputs.tag_exists }}" == "true" ]; then
54+
echo "Tag already exists. Proceeding with publish."
55+
elif [ "${{ github.event_name }}" == "push" ]; then
56+
echo "Release job probably ran. Proceeding with publish."
57+
else
58+
echo "Conditions not met. Skipping publish."
59+
exit 1
60+
fi
5261
- name: Trigger NPM publish
5362
uses: peter-evans/repository-dispatch@v1
5463
with:

0 commit comments

Comments
 (0)