github actions release
This commit is contained in:
parent
58a6b7a9f1
commit
593ee56553
33
.github/workflows/create-release.yaml
vendored
Normal file
33
.github/workflows/create-release.yaml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Releases
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: r-lib/actions/setup-r@v2
|
||||||
|
with:
|
||||||
|
r-version: latest
|
||||||
|
- name: create_body
|
||||||
|
run: |
|
||||||
|
news <- readLines('NEWS.md')
|
||||||
|
i <- grep("^# ts", news)[1:2]
|
||||||
|
if (is.na(i[2])) i[2L] <- length(news) + 1L
|
||||||
|
news <- news[(i[1L] + 1L):(i[2L] - 1L)]
|
||||||
|
news <- news[trimws(news) != ""]
|
||||||
|
writeLines(news, "body.md")
|
||||||
|
shell: Rscript {0}
|
||||||
|
- uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
bodyFile: "body.md"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Loading…
x
Reference in New Issue
Block a user