-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (72 loc) · 2.4 KB
/
create_github_release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:
push:
branches:
- devel
- RELEASE*
- ci/*
name: Create Github Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
tag_version: ${{ steps.get_tag.outputs.tag_version }}
steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
fetch-tags: true
- name: Get most recent tag
run: echo "TAG_VERSION=$(git describe --tags --abbrev=0)" >> "$GITHUB_ENV"
- name: Create Release
id: create_release
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
echo "Creating release for tag $TAG_VERSION"
gh release create $TAG_VERSION --title "Release $TAG_VERSION" --notes "Release $TAG_VERSION" --target devel
create_release_artifacts:
needs: [create-release]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
r_version: ['release', 'devel', 'next']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: Install system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install -y libxml2-dev \
libssl-dev libcurl4-openssl-dev \
libharfbuzz-dev libfribidi-dev \
pandoc
- name: Install system dependencies
if: matrix.os == 'macos-latest'
run: |
brew install libxml2 openssl curl\
harfbuzz fribidi pandoc
- name: Setup R
uses: r-lib/actions/setup-r@929c772977a3a13c8733b363bf5a2f685c25dd91 # v2.9.0
with:
r-version: ${{ matrix.r_version }}
use-public-rspm: true
id: r
- name: Install dependencies
uses: r-lib/actions/setup-renv@929c772977a3a13c8733b363bf5a2f685c25dd91 # v2.9.0
- name: Build Package
run: R CMD build .
- name: Rename Package
run: ./utilities/rename_package.sh *.tar.gz
- name: debug
run: |
echo "R version: ${{ steps.r.outputs.installed-r-version }}"
echo "Platform: ${{ runner.os }}"
- name: Upload Release Artifact
run: gh release upload ${{ needs.create-release.outputs.tag_version }} *.tar.gz