Skip to content

Commit

Permalink
chore(ci): add alerts for failed publishes (#4388)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This PR adds an action to open an issue if either the ACVM crates or JS
packages fail to publish.


## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

Co-authored-by: kevaundray <kevtheappdev@gmail.com>
  • Loading branch information
TomAFrench and kevaundray committed Feb 15, 2024
1 parent 2fc95d2 commit a7cc16b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/CRATES_IO_PUBLISH_FAILED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "ACVM crates failed to publish"
assignees: TomAFrench kevaundray savio-sou
---

The {{env.CRATE_VERSION}} release of the ACVM crates failed.

Check the [Publish ACVM]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
11 changes: 11 additions & 0 deletions .github/JS_PUBLISH_FAILED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "JS packages failed to publish"
assignees: TomAFrench kevaundray savio-sou
labels: js
---

The {{env.NPM_TAG}} release of the JS packages failed.

Check the [Publish JS packages]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
13 changes: 13 additions & 0 deletions .github/workflows/publish-acvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,16 @@ jobs:
cargo publish --package acvm
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.ACVM_CRATES_IO_TOKEN }}

# Raise an issue if any package failed to publish
- name: Alert on failed publish
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CRATE_VERSION: ${{ inputs.noir-ref }}
WORKFLOW_NAME: ${{ github.workflow }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/JS_PUBLISH_FAILED.md
13 changes: 13 additions & 0 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,16 @@ jobs:

- name: Publish ES Packages
run: yarn publish:all --access public --tag ${{ inputs.npm-tag }}

# Raise an issue if any package failed to publish
- name: Alert on failed publish
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TAG: ${{ inputs.npm-tag }}
WORKFLOW_NAME: ${{ github.workflow }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/JS_PUBLISH_FAILED.md

0 comments on commit a7cc16b

Please sign in to comment.