mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-13 07:55:20 +00:00
.github: Run release style builds on all PRs
Adjust the release workflow to move the conditional check on the tag creation into the steps that create the release/upload the assets. This allows us to ensure we're always in a releaseable state. Signed-off-by: Rob Bradford <robert.bradford@intel.com> (cherry picked from commit ef7e177df2ffd9233eec6870ace5152217ef8d38) Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
460ba718d4
commit
62c1f39ea2
11
.github/workflows/release.yaml
vendored
11
.github/workflows/release.yaml
vendored
@ -1,9 +1,8 @@
|
|||||||
name: Cloud Hypervisor Release
|
name: Cloud Hypervisor Release
|
||||||
on: [create]
|
on: [pull_request, create]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -55,6 +54,7 @@ jobs:
|
|||||||
mkdir .cargo
|
mkdir .cargo
|
||||||
cargo vendor > .cargo/config.toml
|
cargo vendor > .cargo/config.toml
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
@ -68,6 +68,7 @@ jobs:
|
|||||||
working-directory: ../
|
working-directory: ../
|
||||||
run: tar cJf cloud-hypervisor-${{ github.event.ref }}.tar.xz cloud-hypervisor-${{ github.event.ref }}
|
run: tar cJf cloud-hypervisor-${{ github.event.ref }}.tar.xz cloud-hypervisor-${{ github.event.ref }}
|
||||||
- name: Upload cloud-hypervisor vendored source archive
|
- name: Upload cloud-hypervisor vendored source archive
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: upload-release-cloud-hypervisor-vendored-sources
|
id: upload-release-cloud-hypervisor-vendored-sources
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@ -78,6 +79,7 @@ jobs:
|
|||||||
asset_name: cloud-hypervisor-${{ github.event.ref }}.tar.xz
|
asset_name: cloud-hypervisor-${{ github.event.ref }}.tar.xz
|
||||||
asset_content_type: application/x-xz
|
asset_content_type: application/x-xz
|
||||||
- name: Upload cloud-hypervisor
|
- name: Upload cloud-hypervisor
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: upload-release-cloud-hypervisor
|
id: upload-release-cloud-hypervisor
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@ -88,6 +90,7 @@ jobs:
|
|||||||
asset_name: cloud-hypervisor
|
asset_name: cloud-hypervisor
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload static cloud-hypervisor
|
- name: Upload static cloud-hypervisor
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: upload-release-static-cloud-hypervisor
|
id: upload-release-static-cloud-hypervisor
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@ -98,6 +101,7 @@ jobs:
|
|||||||
asset_name: cloud-hypervisor-static
|
asset_name: cloud-hypervisor-static
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload ch-remote
|
- name: Upload ch-remote
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: upload-release-ch-remote
|
id: upload-release-ch-remote
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@ -108,6 +112,7 @@ jobs:
|
|||||||
asset_name: ch-remote
|
asset_name: ch-remote
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload static-ch-remote
|
- name: Upload static-ch-remote
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: upload-release-static-ch-remote
|
id: upload-release-static-ch-remote
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@ -118,6 +123,7 @@ jobs:
|
|||||||
asset_name: ch-remote-static
|
asset_name: ch-remote-static
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload static AArch64 cloud-hypervisor
|
- name: Upload static AArch64 cloud-hypervisor
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: upload-release-static-aarch64-cloud-hypervisor
|
id: upload-release-static-aarch64-cloud-hypervisor
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@ -128,6 +134,7 @@ jobs:
|
|||||||
asset_name: cloud-hypervisor-static-aarch64
|
asset_name: cloud-hypervisor-static-aarch64
|
||||||
asset_content_type: application/octet-stream
|
asset_content_type: application/octet-stream
|
||||||
- name: Upload static AArch64 ch-remote
|
- name: Upload static AArch64 ch-remote
|
||||||
|
if: github.event_name == 'create' && github.event.ref_type == 'tag'
|
||||||
id: upload-release-static-aarch64-ch-remote
|
id: upload-release-static-aarch64-ch-remote
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user