From 6f7fd373c30bcff5b48dabe79300697f044444e0 Mon Sep 17 00:00:00 2001 From: LTLA Date: Thu, 18 Jul 2024 13:43:20 -0700 Subject: [PATCH] Added CI workflow for tag creation, dropped version for release. --- .github/workflows/create-tag.yaml | 33 +++++++++++++++++++++++++++++++ CMakeLists.txt | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/create-tag.yaml diff --git a/.github/workflows/create-tag.yaml b/.github/workflows/create-tag.yaml new file mode 100644 index 0000000..b5e0624 --- /dev/null +++ b/.github/workflows/create-tag.yaml @@ -0,0 +1,33 @@ +on: + workflow_run: + workflows: [Run unit tests] + types: [completed] + branches: [master] + +name: Tag project version + +jobs: + tag: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - uses: actions/checkout@v4 + + - name: Get current version + id: current + run: | + current=$(cat CMakeLists.txt | grep ' *VERSION' | sed 's/.*VERSION //g') + echo "Current version is ${current}" + echo "version=v${current}" >> $GITHUB_OUTPUT + + - name: Get latest version + id: latest + uses: actions-ecosystem/action-get-latest-tag@v1 + with: + semver_only: true + + - name: Tag version if new + if: ${{ steps.current.outputs.version != steps.latest.outputs.tag }} + uses: actions-ecosystem/action-push-tag@v1 + with: + tag: ${{ steps.current.outputs.version }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 2111cc0..593938f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.14) project(scran_markers - VERSION 1.0.0 + VERSION 0.1.0 DESCRIPTION "Marker detection for single-cell data" LANGUAGES CXX)