Skip to content

Commit

Permalink
ci: Fixed missing env var in release tagging (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah committed Apr 5, 2024
1 parent c3d2ccd commit 6fbbed4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -67,6 +69,7 @@ jobs:
fi
fi
- name: Calculate Release Name
id: release-name
run: |
set -Eeuxo pipefail
echo "CI_CHANNEL=${CI_CHANNEL}"
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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/*
2 changes: 1 addition & 1 deletion .github/workflows/rust-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6fbbed4

Please sign in to comment.