README.md

Publish GitHub Releases

check codecov CRAN_Status_Badge

Github: https://github.com/RTagBot/tagbot

Documentation: https://rtagbot.github.io/tagbot

Simplify the process of making a GitHub release. There are three major features provided by ‘tagbot’. First, it determines which commit corresponds to a release by diffing the source files of the release and the package’s git repo. It also generates a changelog of closed issues and merged pull requests from GitHub API. And finally, it publishes a GitHub release with the changelog.

Installation

You can install the released version of tagbot from CRAN with:

install.packages("tagbot")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("rtagbot/tagbot")

Example

Here is an example of languageserver.

library(tagbot)
# cd into a local git clone of `languageserver`

(release <- tagbot::find_release("0.3.5"))
#> languageserver v0.3.5 [tag:v0.3.5, sha:e3ab335]

# changelog for a particular release
tagbot::changelog(release)
#> **Closed issues:**
#> - .lintr defaults are not respected (#235)
#> - Upgrade to roxygen2 7.x (#233)
#> - respect client capability of snippetSupport (#231)
#> - Diagnostics not working for one-line document (#222)
#> - lsp crash on didOpen single file without a workspace folder (#219)
#> - diagnostics_task error on certain parsing error (#218)
#>
#> **Merged pull requests:**
#> - Respect linter_file in diagnostics (#236)
#> - Use roxygen2 7.1 (#234)
#> - Respect client snippetSupport (#232)
#> - Remove dependency on stringr (#230)
#> - Remove dependency on readr (#229)
#> - Always use content in diagnose_file (#223)
#> - Fix handling null rootUri (#221)
#> - Call diagnostics_callback on diagnostics_task error (#220)

# for dev changelog
tagbot::changelog()
#> **Closed issues:**
#> - Rmd Color coding doesn't work if there is a space after the backticks and the bracket (#255)
#> - Language server crash when open a single file without a workspace folder (#249)
#> - language server uses excessive CPU (#245)
#>
#> **Merged pull requests:**
#> - Generalize rmd chunk pattern (#256)
#> - Add a test case for null workspace root (#252)
#> - respect NAMESPACE file (#248)
#> - Run tasks with delay to reduce CPU usage on input (#246)
#> - requires collections 0.3.0 (#243)
#> - experiemental setting to disable snippets (#240)
#> - fix enclosed_by_quotes (#239)

GitHub workflows

tagbot is able to match CRAN releases with repo commits and tag the matching commit. It is required that the commit is pushed to any branches of the repo.

To check and publish github release every six hours, put the following in .github/workflows/tagbot.yml

name: tagbot

on:
  schedule:
    # every six hour
    - cron: 0 */6 * * *

jobs:
  publish-github-release:
    runs-on: ubuntu-latest
    container: rtagbot/tagbot:latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: check and publish release
        run: |
          tagbot::publish_release()
        shell: Rscript {0}
        env:
          GITHUB_PAT: ${{secrets.GITHUB_TOKEN}}

Example release: https://github.com/randy3k/collections/releases/tag/v0.3.1

Screen Shot 2020-05-24 at 2 54 12 PM

Docker

A docker image with tagbot preinstalled in avaiable at docker hub.



RTagBot/tagbot documentation built on May 1, 2023, 12:16 a.m.