From deecc42083b4de430eaa1a9299a9f0278c4a9dff Mon Sep 17 00:00:00 2001 From: LTLA Date: Thu, 18 Jul 2024 14:27:11 -0700 Subject: [PATCH] Added CI workflow for tag creation, drop version number 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 cea53de..80cdf11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.14) project(scran_pca - VERSION 1.0.0 + VERSION 0.1.0 DESCRIPTION "Principal components analysis for single-cell data" LANGUAGES CXX)