Skip to content

Commit 1ec21ca

Browse files
committed
Adjust snapit workflow
1 parent 492450a commit 1ec21ca

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/snapit.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,34 +144,37 @@ jobs:
144144
issue_number: context.issue.number,
145145
owner: context.repo.owner,
146146
repo: context.repo.repo,
147-
body: `💥 Snapshot release unsuccessful! No tags have been found. ` +
148-
'Did you run `yarn changeset` and committed your changes?',
147+
body: `💥 **Snapshot release unsuccessful!** No tags have been found.\n\n` +
148+
'Try running the command below and committing your changes.' +
149+
'```sh\n' +
150+
'yarn changeset\n' +
151+
'```',
149152
})
150153
core.setOutput('succeeded', 'false')
151-
core.setFailed('No snapshot tags have been found')
152154
}
153155
154-
- name: Add final reaction
156+
- name: Add success reaction
155157
uses: peter-evans/create-or-update-comment@v2
156158
if: ${{ steps.snapshot-release.outputs.succeeded == 'true' }}
157159
with:
158160
comment-id: ${{ github.event.comment.id }}
159161
reactions: rocket
160162

161-
- name: Add final reaction
163+
- name: Add failure reaction
162164
uses: peter-evans/create-or-update-comment@v2
163165
if: ${{ steps.snapshot-release.outputs.succeeded == 'false' }}
164166
with:
165167
comment-id: ${{ github.event.comment.id }}
166168
reactions: confused
167169

168-
- name: Create and publish snapshot release
170+
- name: Fail workflow if snapshot failed
169171
uses: actions/github-script@v6
172+
if: ${{ steps.snapshot-release.outputs.succeeded == 'false' }}
170173
env:
171174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172175
with:
173176
script: |
174-
const execa = require('execa')
177+
core.setFailed('No snapshot tags have been found')
175178
176179
- name: Set latest commit status as ${{ job.status }}
177180
uses: myrotvorets/set-commit-status-action@master

0 commit comments

Comments
 (0)