Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[force-build] Fix build version to remove 'v' in it. Added [force-bu… #98

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -29,6 +31,16 @@ jobs:
conda activate base
conda install -y -c conda-forge conda-build anaconda-client

- name: Set version without 'v'
run: |
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

- name: Build and Upload Conda package
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: "grdwindinversion"
version: {{ environ.get('GIT_DESCRIBE_TAG', 0)}}
version: "{{ environ.get('GIT_DESCRIBE_TAG', '0') | string }}"

source:
path: ../.
Expand Down
Loading