Skip to content

Commit 2407e2a

Browse files
authored
Merge pull request #184 from firebase/feature/run_packaging_on_push_to_dev
Run complete C++ SDK packaging step whenever a push to "dev" occurs.
2 parents 529572f + af8d471 commit 2407e2a

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

.github/workflows/cpp-packaging.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: CPP binary SDK packaging
22
on:
3+
push:
4+
branches:
5+
# Run a full packaging step any time a new branch is merged into dev.
6+
- dev
37
workflow_dispatch:
48
inputs:
59
commitIdToPackage:
@@ -40,9 +44,16 @@ jobs:
4044
echo "::warning ::Using commit ID '${{ github.event.inputs.commitIdToPackage }}' for building and packaging SDK and tests."
4145
fi
4246
fi
43-
if [[ "${{ github.event.inputs.preserveIntermediateArtifacts }}" != "0" ]]; then
44-
echo "::warning ::Intermediate artifacts will be preserved."
45-
fi
47+
48+
- name: log if preserving intermediate artifacts
49+
# Inverse of the conditional on the cleanup_artifacts step.
50+
if: |
51+
!(
52+
(github.event.inputs.preserveIntermediateArtifacts == 0 || github.event.inputs.preserveIntermediateArtifacts == '')
53+
&& github.event.inputs.downloadPublicVersion == ''
54+
&& github.event.inputs.downloadPreviousRun == ''
55+
)
56+
run: echo "::warning ::Intermediate artifacts will be preserved."
4657

4758
build_tools:
4859
name: build-tools-${{ matrix.tools_platform }}
@@ -536,7 +547,12 @@ jobs:
536547
name: cleanup-artifacts
537548
runs-on: ubuntu-latest
538549
needs: [merge_packages]
539-
if: ${{ github.event.inputs.preserveIntermediateArtifacts == 0 && github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }}
550+
if: |
551+
(
552+
(github.event.inputs.preserveIntermediateArtifacts == 0 || github.event.inputs.preserveIntermediateArtifacts == '')
553+
&& github.event.inputs.downloadPublicVersion == ''
554+
&& github.event.inputs.downloadPreviousRun == ''
555+
)
540556
steps:
541557
- uses: geekyeggo/delete-artifact@v1
542558
with:

0 commit comments

Comments
 (0)