diff options
author | Delan Azabani <dazabani@igalia.com> | 2024-02-14 16:05:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 08:05:09 +0000 |
commit | d00312eb082cc7fbdbb1b17f9fbe519f475eec07 (patch) | |
tree | a16a24f366bb550e849259b6bef85e65f4c88965 /.github/workflows | |
parent | a4db81cbd041a9470f0997b3ac736abe034bccdb (diff) | |
download | servo-d00312eb082cc7fbdbb1b17f9fbe519f475eec07.tar.gz servo-d00312eb082cc7fbdbb1b17f9fbe519f475eec07.zip |
Bury failed nightly releases as prereleases (#31348)
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/nightly.yml | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a2bab26197e..42b1a027ec8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -41,21 +41,32 @@ jobs: publish-nightly-release: # This job is only useful when run on upstream servo. - if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch' + if: always() && (github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch') name: Publish GH Release for nightly runs-on: ubuntu-20.04 steps: - - run: | + - name: Publish as latest (success) + if: success() + run: | gh api \ --method PATCH \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ /repos/${NIGHTLY_REPO}/releases/${RELEASE_ID} \ -F draft=false - env: - GITHUB_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }} - NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds - RELEASE_ID: ${{ needs.create-draft-release.outputs.release-id }} + - name: Publish as latest (failure) + if: failure() + run: | + gh api \ + --method PATCH \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/${NIGHTLY_REPO}/releases/${RELEASE_ID} \ + -F prerelease=true -F draft=false + env: + GITHUB_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }} + NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds + RELEASE_ID: ${{ needs.create-draft-release.outputs.release-id }} needs: - create-draft-release - upload-linux |