From b6c9c3c91623347bb26174709d466e720db17d4e Mon Sep 17 00:00:00 2001 From: Daniel Lipovetsky Date: Wed, 18 Oct 2023 11:12:51 -0700 Subject: [PATCH] build: Generate and upload release artifacts in one step --- .github/workflows/release.yaml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9648f0663..a0788024a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -43,14 +43,6 @@ jobs: REGISTRY=${{ env.registry }} \ CAPVCD_IMG=${{ env.repository }} \ VERSION=${{ env.version }} - - name: Generate GitHub release artifacts - # See note on make variables, above. - run: | - make release-manifests \ - --makefile d2iq.Makefile - REGISTRY=${{ env.registry }} \ - CAPVCD_IMG=${{ env.repository }} \ - VERSION=${{ env.version }} - name: Create (draft) GitHub release run: | gh release create ${{ env.version }} \ @@ -58,9 +50,20 @@ jobs: --draft env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload GitHub release artifacts + - name: Generate release artifacts, and attach them to the GitHub release + # Because steps do not share data, the artifacts must be generated and + # uploaded in one step. + # + # Also see note on make variables, above. run: | - gh release upload ${{ env.version }} \ + make release-manifests \ + --makefile d2iq.Makefile + REGISTRY=${{ env.registry }} \ + CAPVCD_IMG=${{ env.repository }} \ + VERSION=${{ env.version }} + gh release upload \ + --clobber \ + ${{ env.version }} \ metadata.yaml \ templates/infrastructure-components.yaml env: