diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 090d885..53e667d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -66,7 +66,13 @@ jobs: "$GCC_PREFIX"strip $BINARY_NAME ########## create tar.gz ########## - RELEASE_NAME="hc-runner-${{ github.ref_name }}-${{ matrix.job.os-name }}-${{ matrix.job.architecture }}" + + # For releases, ref_name will be something like `v1.2.3`, but we want to make sure the + # packaging is also working for non-release runs, using something like `branchname`. + REFNAME=${{ github.ref_name }} + # Avoid issues with refnames that have slashes, like `hc-runner-dependabot/cargo/h2-0.3.26` + REFNAME=${REFNAME//\//-} + RELEASE_NAME="hc-runner-${REFNAME}-${{ matrix.job.os-name }}-${{ matrix.job.architecture }}" tar czvf "$RELEASE_NAME.tar.gz" "$BINARY_NAME" ########## create sha256 ##########