From 5f973746d3a448ed74eae4925967fa4ce3ed3f85 Mon Sep 17 00:00:00 2001
From: Yash Maheshwari <yashmaheshwari551@gmail.com>
Date: Mon, 18 Mar 2024 10:07:34 +0530
Subject: [PATCH] Improved: the release workflow to create a label using the
 tag on release

---
 .github/workflows/common-firebase-hosting-release.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/.github/workflows/common-firebase-hosting-release.yml b/.github/workflows/common-firebase-hosting-release.yml
index 03c479d..0530645 100644
--- a/.github/workflows/common-firebase-hosting-release.yml
+++ b/.github/workflows/common-firebase-hosting-release.yml
@@ -51,3 +51,14 @@ jobs:
             run: firebase deploy --token "$HOTWAX_PUBLIC_SECRET" -m "Deploying via GitHub actions"  --only hosting:uat
             env:
                 HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
+  release:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: "Fetch release tag"
+        run: |
+          echo "LABEL=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
+      
+      - name: "Create label"
+        run: gh label create "release-${{ env.LABEL }}" --color FF7F7E