mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +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
15
.github/workflows/nightly.yml
vendored
15
.github/workflows/nightly.yml
vendored
|
@ -41,17 +41,28 @@ jobs:
|
||||||
|
|
||||||
publish-nightly-release:
|
publish-nightly-release:
|
||||||
# This job is only useful when run on upstream servo.
|
# 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
|
name: Publish GH Release for nightly
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
- name: Publish as latest (success)
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
gh api \
|
gh api \
|
||||||
--method PATCH \
|
--method PATCH \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
/repos/${NIGHTLY_REPO}/releases/${RELEASE_ID} \
|
/repos/${NIGHTLY_REPO}/releases/${RELEASE_ID} \
|
||||||
-F draft=false
|
-F draft=false
|
||||||
|
- 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:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
|
||||||
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
NIGHTLY_REPO: ${{ github.repository_owner }}/servo-nightly-builds
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue