mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Bury failed nightly releases as prereleases (#31348)
This commit is contained in:
parent
a4db81cbd0
commit
d00312eb08
1 changed files with 17 additions and 6 deletions
23
.github/workflows/nightly.yml
vendored
23
.github/workflows/nightly.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue