From b2afa276ab21a5165f67e1cd55a4303a6e7141df Mon Sep 17 00:00:00 2001 From: Avik Datta Date: Thu, 4 Dec 2025 19:54:34 +0000 Subject: [PATCH] added git tag based release config --- .github/workflows/release.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..9e9ccf1d --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Create release and build docker image +on: + push: + tags: + - 'v*' +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write + env: + GH_TOKEN: ${{ github.token }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Extract tag name + id: tag + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + - name: Create GitHub release + run: | + # Use the actual tag name from the trigger + TAG_NAME="${{ steps.tag.outputs.TAG_NAME }}" + # checking for existing releases + if ! gh release view "$TAG_NAME" >/dev/null 2>&1; then + gh release create "$TAG_NAME" \ + --title "Release $TAG_NAME" \ + --generate-notes + fi