From 3eeaf76db721fedced2fd0a69dae6aafef4abcc1 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Thu, 15 Feb 2024 18:22:56 +0000 Subject: [PATCH] chore(ci): add alerts for failed publishes --- .github/CRATES_IO_PUBLISH_FAILED.md | 10 ++++++++++ .github/JS_PUBLISH_FAILED.md | 11 +++++++++++ .github/workflows/publish-acvm.yml | 13 +++++++++++++ .github/workflows/publish-es-packages.yml | 13 +++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 .github/CRATES_IO_PUBLISH_FAILED.md create mode 100644 .github/JS_PUBLISH_FAILED.md diff --git a/.github/CRATES_IO_PUBLISH_FAILED.md b/.github/CRATES_IO_PUBLISH_FAILED.md new file mode 100644 index 00000000000..ec4de319772 --- /dev/null +++ b/.github/CRATES_IO_PUBLISH_FAILED.md @@ -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}}` diff --git a/.github/JS_PUBLISH_FAILED.md b/.github/JS_PUBLISH_FAILED.md new file mode 100644 index 00000000000..5b9f79aac1f --- /dev/null +++ b/.github/JS_PUBLISH_FAILED.md @@ -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}}` diff --git a/.github/workflows/publish-acvm.yml b/.github/workflows/publish-acvm.yml index 0251aaa0377..e19a61fff4f 100644 --- a/.github/workflows/publish-acvm.yml +++ b/.github/workflows/publish-acvm.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/publish-es-packages.yml b/.github/workflows/publish-es-packages.yml index fa245883ced..d4cd356a138 100644 --- a/.github/workflows/publish-es-packages.yml +++ b/.github/workflows/publish-es-packages.yml @@ -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 \ No newline at end of file