From c69437759573b85afba0b4e81e89b208a63608b0 Mon Sep 17 00:00:00 2001 From: Dhananjhay Date: Thu, 12 Feb 2026 14:32:04 -0500 Subject: [PATCH 1/3] build and push conda package on manual trigger and tag releases --- .github/workflows/build_conda_package.yml | 32 +++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_conda_package.yml b/.github/workflows/build_conda_package.yml index c817e44..a6f1ffa 100644 --- a/.github/workflows/build_conda_package.yml +++ b/.github/workflows/build_conda_package.yml @@ -3,9 +3,8 @@ name: Build and Upload Conda Package on: push: - branches: [master] - # pull_request: - # types: [opened, synchronize, reopened] + tags: + - "v*" workflow_dispatch: jobs: build-and-upload: @@ -13,27 +12,26 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Get latest version from master + + - name: Get version from tag + if: startsWith(github.ref, 'refs/tags/') run: | - echo "Fetching latest tag..." - LATEST_TAG=$(git ls-remote --tags origin | cut -f2 | sed 's#refs/tags/##' | tr -d 'vV' | sort -V | tail -n1) + echo "Using tag version..." + LATEST_TAG="${GITHUB_REF_NAME#v}" echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV - - name: Get the branch name for version - if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master' + + - name: Get branch name for version + if: github.event_name == 'workflow_dispatch' run: | echo "Branch name: ${{ github.ref_name }}..." echo "LATEST_TAG=${{ github.ref_name }}" >> $GITHUB_ENV - - name: Get latest commit SHA from master - run: | - echo "Fetching latest commit on master branch..." - COMMIT_SHA=$(git ls-remote origin refs/heads/master | cut -f1) - echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV - - name: Get latest commit SHA from branch - if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/master' + + - name: Get current commit SHA run: | - echo "Fetching latest commit on branch: ${{ github.ref_name }}..." - COMMIT_SHA=$(git ls-remote origin ${{ github.ref }} | cut -f1) + echo "Using checked-out commit..." + COMMIT_SHA=$(git rev-parse HEAD) echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV + - name: Update recipe.yaml with latest rev and version run: | echo "Updating recipe.yaml with commit: $COMMIT_SHA and tag: $LATEST_TAG" From cc394caffeb191882e52b2e843d770589c631ef9 Mon Sep 17 00:00:00 2001 From: Dhananjhay Date: Thu, 12 Feb 2026 14:44:42 -0500 Subject: [PATCH 2/3] stop using branch name as version --- .github/workflows/build_conda_package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_conda_package.yml b/.github/workflows/build_conda_package.yml index a6f1ffa..ee2d6ae 100644 --- a/.github/workflows/build_conda_package.yml +++ b/.github/workflows/build_conda_package.yml @@ -23,7 +23,8 @@ jobs: - name: Get branch name for version if: github.event_name == 'workflow_dispatch' run: | - echo "Branch name: ${{ github.ref_name }}..." + SHORT_SHA=$(git rev-parse --short HEAD) + VERSION="0.0.0.dev${SHORT_SHA}" echo "LATEST_TAG=${{ github.ref_name }}" >> $GITHUB_ENV - name: Get current commit SHA From e2cb377433190a6dae910e7fb5affc2910b0e434 Mon Sep 17 00:00:00 2001 From: Dhananjhay Date: Thu, 12 Feb 2026 14:47:42 -0500 Subject: [PATCH 3/3] stop using branch name as version --- .github/workflows/build_conda_package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_conda_package.yml b/.github/workflows/build_conda_package.yml index ee2d6ae..a3f8bfc 100644 --- a/.github/workflows/build_conda_package.yml +++ b/.github/workflows/build_conda_package.yml @@ -25,7 +25,7 @@ jobs: run: | SHORT_SHA=$(git rev-parse --short HEAD) VERSION="0.0.0.dev${SHORT_SHA}" - echo "LATEST_TAG=${{ github.ref_name }}" >> $GITHUB_ENV + echo "LATEST_TAG=$VERSION" >> $GITHUB_ENV - name: Get current commit SHA run: |