Skip to content

Commit

Permalink
Try to avoid errors when refname contains a slash
Browse files Browse the repository at this point in the history
  • Loading branch information
n8henrie committed Apr 5, 2024
1 parent e12c99f commit bc1dff8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##########
Expand Down

0 comments on commit bc1dff8

Please sign in to comment.