From 31eaea16cac09a179dc4ca8b14b01cfd13cc41f2 Mon Sep 17 00:00:00 2001 From: Sanne Raymaekers Date: Fri, 31 Jan 2025 12:56:28 +0100 Subject: [PATCH] .github/workflows/release: work around git clean The osbuild release action cleans the repository, removing the tarball that gets uploaded to the release. This tarball needs to be built before schutzbot commits the version bump, so move it so it doesn't get cleaned. --- .github/workflows/release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a74225b6..5d4fb8bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,10 @@ jobs: run: npm ci - name: Make dist - run: make dist + run: | + make dist + RELEASE_NO=$(echo ${{github.ref_name}} | tr -d 'v') + mv "cockpit-image-builder-$RELEASE_NO.tar.gz" ../cockpit-image-builder-${{github.ref_name}}.tar.gz # create release, which will bump the version - name: Upstream release @@ -37,7 +40,5 @@ jobs: # so the v needs to be in the tarball when we upload it as a release artefact. - name: Upload release artefact run: | - RELEASE_NO=$(echo ${{github.ref_name}} | tr -d 'v') - mv "cockpit-image-builder-$RELEASE_NO.tar.gz" cockpit-image-builder-${{github.ref_name}}.tar.gz gh release upload ${{github.ref_name}} \ - cockpit-image-builder-${{github.ref_name}}.tar.gz + ../cockpit-image-builder-${{github.ref_name}}.tar.gz