ci: Use GitHub context for artifact name (#53559)

Finn Evers created

Missed this yesterday in
https://github.com/zed-industries/zed/pull/53433, because in the `with`
level, we need to use the proper context syntax.

Release Notes:

- N/A

Change summary

.github/workflows/compliance_check.yml       |  6 +++---
.github/workflows/release.yml                | 12 ++++++------
tooling/xtask/src/tasks/workflows/release.rs |  4 +++-
3 files changed, 12 insertions(+), 10 deletions(-)

Detailed changes

.github/workflows/compliance_check.yml 🔗

@@ -42,12 +42,12 @@ jobs:
         GITHUB_APP_KEY: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
         LATEST_TAG: ${{ steps.determine-version.outputs.tag }}
       continue-on-error: true
-    - name: '@actions/upload-artifact compliance-report-${GITHUB_REF_NAME}.md'
+    - name: '@actions/upload-artifact compliance-report-${{ github.ref_name }}.md'
       if: always()
       uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
       with:
-        name: compliance-report-${GITHUB_REF_NAME}.md
-        path: compliance-report-${GITHUB_REF_NAME}.md
+        name: compliance-report-${{ github.ref_name }}.md
+        path: compliance-report-${{ github.ref_name }}.md
         if-no-files-found: error
     - name: send_compliance_slack_notification
       if: always()

.github/workflows/release.yml 🔗

@@ -314,12 +314,12 @@ jobs:
         GITHUB_APP_ID: ${{ secrets.ZED_ZIPPY_APP_ID }}
         GITHUB_APP_KEY: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
       continue-on-error: true
-    - name: '@actions/upload-artifact compliance-report-${GITHUB_REF_NAME}.md'
+    - name: '@actions/upload-artifact compliance-report-${{ github.ref_name }}.md'
       if: always()
       uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
       with:
-        name: compliance-report-${GITHUB_REF_NAME}.md
-        path: compliance-report-${GITHUB_REF_NAME}.md
+        name: compliance-report-${{ github.ref_name }}.md
+        path: compliance-report-${{ github.ref_name }}.md
         if-no-files-found: error
     - name: send_compliance_slack_notification
       if: always()
@@ -682,12 +682,12 @@ jobs:
       env:
         GITHUB_APP_ID: ${{ secrets.ZED_ZIPPY_APP_ID }}
         GITHUB_APP_KEY: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
-    - name: '@actions/upload-artifact compliance-report-${GITHUB_REF_NAME}.md'
+    - name: '@actions/upload-artifact compliance-report-${{ github.ref_name }}.md'
       if: always()
       uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
       with:
-        name: compliance-report-${GITHUB_REF_NAME}.md
-        path: compliance-report-${GITHUB_REF_NAME}.md
+        name: compliance-report-${{ github.ref_name }}.md
+        path: compliance-report-${{ github.ref_name }}.md
         if-no-files-found: error
         overwrite: true
     - name: send_compliance_slack_notification

tooling/xtask/src/tasks/workflows/release.rs 🔗

@@ -158,6 +158,8 @@ pub(crate) fn create_sentry_release() -> Step<Use> {
 }
 
 pub(crate) const COMPLIANCE_REPORT_PATH: &str = "compliance-report-${GITHUB_REF_NAME}.md";
+pub(crate) const COMPLIANCE_REPORT_ARTIFACT_PATH: &str =
+    "compliance-report-${{ github.ref_name }}.md";
 pub(crate) const COMPLIANCE_STEP_ID: &str = "run-compliance-check";
 const NEEDS_REVIEW_PULLS_URL: &str = "https://github.com/zed-industries/zed/pulls?q=is%3Apr+is%3Aclosed+label%3A%22PR+state%3Aneeds+review%22";
 
@@ -206,7 +208,7 @@ pub(crate) fn add_compliance_steps(
         (job, result)
     }
 
-    let upload_step = upload_artifact(COMPLIANCE_REPORT_PATH)
+    let upload_step = upload_artifact(COMPLIANCE_REPORT_ARTIFACT_PATH)
         .if_condition(Expression::new("always()"))
         .when(
             matches!(context, ComplianceContext::Release { .. }),