Skip to content

Commit f1d1509

Browse files
DaniPopesmikelodder7
authored andcommitted
ci: open an issue if any release job fails (foundry-rs#5673)
1 parent 9da24fe commit f1d1509

File tree

2 files changed

+26
-16
lines changed

2 files changed

+26
-16
lines changed

.github/workflows/heavy-integration.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ jobs:
3838
run: |
3939
cargo nextest run -r -p forge --test cli --features heavy-integration-tests --retries 1 -E 'test(~heavy_integration)'
4040
41-
# If any of the steps fail, this will create a high-priority issue to signal so.
41+
# If any of the jobs fail, this will create a high-priority issue to signal so.
42+
issue:
43+
name: Open an issue
44+
runs-on: ubuntu-latest
45+
if: ${{ failure() }}
46+
steps:
4247
- uses: JasonEtco/create-an-issue@v2
43-
if: ${{ failure() }}
4448
env:
4549
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4650
WORKFLOW_URL: |

.github/workflows/release.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ jobs:
138138
PLATFORM_NAME: ${{ matrix.job.platform }}
139139
TARGET: ${{ matrix.job.target }}
140140
ARCH: ${{ matrix.job.arch }}
141-
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
141+
VERSION_NAME: |
142+
${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
142143
run: |
143144
if [ "$PLATFORM_NAME" == "linux" ]; then
144145
tar -czvf "foundry_${VERSION_NAME}_${PLATFORM_NAME}_${ARCH}.tar.gz" -C ./target/${TARGET}/release forge cast anvil chisel
@@ -162,7 +163,8 @@ jobs:
162163
env:
163164
PLATFORM_NAME: ${{ matrix.job.platform }}
164165
TARGET: ${{ matrix.job.target }}
165-
VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
166+
VERSION_NAME: |
167+
${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }}
166168
run: |
167169
sudo apt-get -y install help2man
168170
help2man -N ./target/${TARGET}/release/forge > forge.1
@@ -203,17 +205,6 @@ jobs:
203205
${{ steps.artifacts.outputs.file_name }}
204206
${{ steps.man.outputs.foundry_man }}
205207
206-
# If any of the steps fail, this will create a high-priority issue
207-
# to signal so.
208-
- uses: JasonEtco/create-an-issue@v2
209-
if: ${{ failure() }}
210-
env:
211-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
212-
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
213-
with:
214-
update_existing: true
215-
filename: .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md
216-
217208
cleanup:
218209
name: Release cleanup
219210
runs-on: ubuntu-20.04
@@ -236,4 +227,19 @@ jobs:
236227
with:
237228
script: |
238229
const prunePrereleases = require('./.github/scripts/prune-prereleases.js')
239-
await prunePrereleases({github, context})
230+
await prunePrereleases({github, context})
231+
232+
# If any of the jobs fail, this will create a high-priority issue to signal so.
233+
issue:
234+
name: Open an issue
235+
runs-on: ubuntu-latest
236+
if: ${{ failure() }}
237+
steps:
238+
- uses: JasonEtco/create-an-issue@v2
239+
env:
240+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
241+
WORKFLOW_URL: |
242+
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
243+
with:
244+
update_existing: true
245+
filename: .github/RELEASE_FAILURE_ISSUE_TEMPLATE.md

0 commit comments

Comments
 (0)