curl -X POST -H 'Content-type:application/json' --data '{"text":":pb__failed: Failed to publish a new version of ${{ github.event.inputs.package }}"}' $SLACK_WEBHOOK
curl -X POST -H 'Content-type:application/json' --data '{"text":":dance: Successfully published a new version of ${{ github.event.inputs.package }}"}' $SLACK_WEBHOOK
name:"Tag commit with ${{ github.event.inputs.package }}-version"
runs-on:"macos-latest"
needs:[test, publish]
steps:
- uses:actions/checkout@v3
- name:Create tag
uses:actions/github-script@v6
with:
script:|
github.rest.git.createRef({
owner:context.repo.owner,
repo:context.repo.repo,
ref:'refs/tags/${{ needs.test.outputs.tag }}',
sha:'${{ needs.test.outputs.sha }}'
})
- name:notify slack on failure
if:failure()
run:|
curl -X POST -H 'Content-type:application/json' --data '{"text":":pb__failed: Publish of ${{ github.event.inputs.package }} was successful, but failed to tag commit ${{ needs.test.outputs.sha }} with version ${{ needs.test.outputs.tag }}"}' $SLACK_WEBHOOK