From 6fbbed4555c8ec9c8048dd6fac7547de56479c44 Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Fri, 5 Apr 2024 06:41:32 -0400 Subject: [PATCH] ci: Fixed missing env var in release tagging (#66) --- .github/workflows/release.yaml | 10 ++++++++-- .github/workflows/rust-ci.yaml | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 288527d0..55cf9b34 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -48,6 +48,8 @@ jobs: check-inputs: name: Check Workflow Inputs runs-on: ubuntu-22.04 + outputs: + release-name: ${{ steps.release-name.outputs.CI_RELEASE_NAME }} steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 with: @@ -67,6 +69,7 @@ jobs: fi fi - name: Calculate Release Name + id: release-name run: | set -Eeuxo pipefail echo "CI_CHANNEL=${CI_CHANNEL}" @@ -85,6 +88,7 @@ jobs: CI_RELEASE_NAME="${CI_COMPONENT}/v${CI_SEMVER}-${CI_CHANNEL}.${channel_num}+${CI_OVERALL_VERSION}" echo "CI_RELEASE_NAME=${CI_RELEASE_NAME}" >>${GITHUB_ENV} + echo "CI_RELEASE_NAME=${CI_RELEASE_NAME}" >>${GITHUB_OUTPUT} rust-ci: name: Rust CI @@ -96,7 +100,9 @@ jobs: release: name: Create Release and Tag runs-on: ubuntu-22.04 - needs: rust-ci + needs: + - rust-ci + - check-inputs steps: - name: Download Artifacts uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # pin@v3 @@ -127,7 +133,7 @@ jobs: - name: Upload Release and Create Tag uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # pin@v1 with: - tag_name: ${{ env.CI_RELEASE_NAME }} + tag_name: ${{ needs.check-inputs.outputs.release-name }} draft: ${{ env.CI_CHANNEL == 'tmp' }} fail_on_unmatched_files: true files: extracted/* diff --git a/.github/workflows/rust-ci.yaml b/.github/workflows/rust-ci.yaml index ed9cdbae..ee075ddc 100644 --- a/.github/workflows/rust-ci.yaml +++ b/.github/workflows/rust-ci.yaml @@ -153,7 +153,7 @@ jobs: - name: Cache cargo dependencies uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # pin@v2 - - name: Use artifact profile if tagged or on main + - name: Choose cargo profile run: | set -Eeuxo pipefail if [[ ${{ github.event_name }} == "pull_request" || ${{ github.event_name }} == "push" ]]; then