Skip to content

Commit 811ce5e

Browse files
committed
ci: Trigger release workflow on push events only
Pushing a new tag fires both create and push events, so the workflow ran twice for the same commit. Subscribe to push only and gate the upload and release steps on the tag ref. Branch pushes still run the builds as a smoke test and tag pushes still publish the draft release.
1 parent 51e1b22 commit 811ce5e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Cloud Hypervisor edk2 release
2-
on: [create, push]
2+
on: push
33

44
jobs:
55
build-x64:
@@ -29,7 +29,7 @@ jobs:
2929
make -C BaseTools
3030
OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b RELEASE
3131
- name: Upload x86-64 artifact
32-
if: github.event_name == 'create' && github.event.ref_type == 'tag'
32+
if: startsWith(github.ref, 'refs/tags/')
3333
uses: actions/upload-artifact@v4
3434
with:
3535
name: cloudhv-x64
@@ -55,15 +55,15 @@ jobs:
5555
build -p ArmVirtPkg/ArmVirtCloudHv.dsc -a AARCH64 -t GCC -b RELEASE \
5656
--pcd gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy=0xC000000000007FD1
5757
- name: Upload AArch64 artifact
58-
if: github.event_name == 'create' && github.event.ref_type == 'tag'
58+
if: startsWith(github.ref, 'refs/tags/')
5959
uses: actions/upload-artifact@v4
6060
with:
6161
name: cloudhv-aarch64
6262
path: Build/ArmVirtCloudHv-AARCH64/RELEASE_GCC/FV/CLOUDHV_EFI.fd
6363

6464
release:
6565
name: Release
66-
if: github.event_name == 'create' && github.event.ref_type == 'tag'
66+
if: startsWith(github.ref, 'refs/tags/')
6767
needs: [build-x64, build-aarch64]
6868
runs-on: ubuntu-latest
6969
permissions:

0 commit comments

Comments
 (0)