From 28617d8f30e7dd665e4bc20f1bc024ca7787b59a Mon Sep 17 00:00:00 2001 From: Ville Vesilehto Date: Tue, 24 Mar 2026 19:31:00 +0200 Subject: [PATCH] ci(release): use env vars for expressions in shell (#7965) --- .github/workflows/release.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 56cdcf1d2..c3bcd1a56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,10 +23,12 @@ jobs: ref: ${{ github.event.inputs.commit }} persist-credentials: false - name: Set up info + env: + INPUT_COMMIT: ${{ github.event.inputs.commit }} run: | set -x -e VERSION=$(make -f Makefile.release version) - COMMIT=$(git rev-parse --quiet --verify ${{ github.event.inputs.commit }}) + COMMIT=$(git rev-parse --quiet --verify "${INPUT_COMMIT}") if [[ "$(git tag -l v${VERSION})" == "v${VERSION}" ]]; then echo "v${VERSION} already released" exit 1 @@ -39,13 +41,18 @@ jobs: - name: Build release binary sha256 run: (cd release; for asset in `ls -A *.tgz *.zip`; do sha256sum $asset > $asset.sha256; done) - name: Remove hidden section - run: sed '/+++/,//d' notes/coredns-${{ steps.info.outputs.version}}.md > release.md + env: + VERSION: ${{ steps.info.outputs.version }} + run: sed '/+++/,//d' "notes/coredns-${VERSION}.md" > release.md - name: Log release info + env: + COMMIT: ${{ steps.info.outputs.commit }} + VERSION: ${{ steps.info.outputs.version }} run: | set -x -e git log -1 - echo ${{ steps.info.outputs.commit }} - echo ${{ steps.info.outputs.version }} + echo "${COMMIT}" + echo "${VERSION}" cat release.md sha256sum release/*.tgz release/*.zip - name: Draft release