From 165550a99658beeb174512a62675caf9594962b6 Mon Sep 17 00:00:00 2001 From: tcevaer Date: Mon, 9 Dec 2024 14:14:26 +0100 Subject: [PATCH 1/3] [force-build] Fix build version to remove 'v' in it. Added [force-build] to force build to test ci --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b008f9..fe6335d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,12 @@ jobs: conda activate base conda install -y -c conda-forge conda-build anaconda-client + - name: Set version without 'v' + run: | + VERSION=${GITHUB_REF_NAME#v} + echo "VERSION=${VERSION}" >> $GITHUB_ENV + echo "GIT_DESCRIBE_TAG=${VERSION}" >> $GITHUB_ENV + - name: Build and Upload Conda package env: ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} From 9683fd7b7d33ce24e1d479abddc576b7d06f149d Mon Sep 17 00:00:00 2001 From: tcevaer Date: Mon, 9 Dec 2024 14:17:31 +0100 Subject: [PATCH 2/3] [force-build] missing staged code --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe6335d..bd67bf8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,10 +4,12 @@ on: release: types: - created + push: + # Triggers on push to any branch jobs: build-and-upload-conda-package: - if: true + if: contains(github.event.head_commit.message, '[force-build]') || startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest #${{ github.event.workflow_run.conclusion == 'success' }} steps: From d2b2543c7ea2f1364827313baf81eb3ffba8e7ba Mon Sep 17 00:00:00 2001 From: tcevaer Date: Mon, 9 Dec 2024 14:25:05 +0100 Subject: [PATCH 3/3] [force-build] Dummy version for testing --- .github/workflows/build.yml | 6 +++++- recipe/meta.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd67bf8..5bd034a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,11 @@ jobs: - name: Set version without 'v' run: | - VERSION=${GITHUB_REF_NAME#v} + if [[ "${GITHUB_REF}" == refs/tags/* ]]; then + VERSION=${GITHUB_REF_NAME#v} + else + VERSION="0.0.0" # Dummy version for testing + fi echo "VERSION=${VERSION}" >> $GITHUB_ENV echo "GIT_DESCRIBE_TAG=${VERSION}" >> $GITHUB_ENV diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3aa76a2..a61cf64 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: "grdwindinversion" - version: {{ environ.get('GIT_DESCRIBE_TAG', 0)}} + version: "{{ environ.get('GIT_DESCRIBE_TAG', '0') | string }}" source: path: ../.