Skip to content

Commit

Permalink
Added CI workflow for tag creation, drop version number for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Jul 18, 2024
1 parent 3f74002 commit deecc42
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/create-tag.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit deecc42

Please sign in to comment.