diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..023981b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,26 @@ +name: Validate R version tag + +on: + push: + tags: + - "v*" + +permissions: + contents: read + +jobs: + validate-version: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Validate tag against DESCRIPTION + env: + RELEASE_TAG: ${{ github.ref_name }} + run: | + package_version="$(awk -F ': *' '$1 == "Version" {print $2}' DESCRIPTION)" + if [ "$RELEASE_TAG" != "v$package_version" ]; then + echo "::error::Release tag $RELEASE_TAG does not match DESCRIPTION version $package_version" + exit 1 + fi diff --git a/DESCRIPTION b/DESCRIPTION index 070b801..7db99e2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: CyteTypeR Title: CyteType for R -Version: 0.4.3 +Version: 0.5.1 Description: CyteTypeR is the R version of CyteType python package. Authors@R: person("Nygen Analytics AB", , ,"contact@nygen.io", role = c("aut", "cre")) diff --git a/R/zzz.R b/R/zzz.R index fd34a94..3af02e8 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -37,7 +37,7 @@ if (package_version(latest) > package_version(current)) { packageStartupMessage( "A newer version of CyteTypeR is available (", current, " -> ", latest, "). ", - "Run remotes::install_github('NygenAnalytics/CyteTypeR') to update." + "Run devtools::install_github('NygenAnalytics/CyteTypeR') to update." ) } }, error = function(e) NULL) diff --git a/README.md b/README.md index 71d6e1e..e0ce5ab 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ For AnnData workflows, use [CyteType](https://github.com/NygenAnalytics/CyteType). > [!IMPORTANT] +> Already installed CyteTypeR? Open R and run `devtools::install_github("NygenAnalytics/CyteTypeR", force = TRUE)` to update to the latest version before you start. +> > CyteType requires an API key. API use is free for academic and non-commercial research. Commercial API use requires a [license](#license). ## Why CyteTypeR?