-
Notifications
You must be signed in to change notification settings - Fork 44
58 lines (50 loc) · 1.57 KB
/
fledge.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
name: fledge
on:
# for manual triggers
workflow_dispatch:
# daily run
schedule:
- cron: "30 0 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.sha }}-${{ github.base_ref || '' }}
cancel-in-progress: true
jobs:
check_fork:
runs-on: ubuntu-latest
outputs:
is_forked: ${{ steps.check.outputs.is_forked }}
steps:
- name: Check if the repo is forked
id: check
run: |
echo "is_forked=$(curl -s -H "Accept: application/vnd.github+json" -H 'Authorization: Bearer ${{ github.token }}' -H "X-GitHub-Api-Version: 2022-11-28" ${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY} | jq .fork)" >> $GITHUB_OUTPUT
fledge:
runs-on: ubuntu-latest
needs: check_fork
if: needs.check_fork.outputs.is_forked == 'false'
permissions:
contents: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
FLEDGE_GHA_CI: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/workflows/git-identity
- uses: ./.github/workflows/install
with:
token: ${{ secrets.GITHUB_TOKEN }}
install-r: false
cache-version: fledge-1
packages: cynkra/fledge
- name: Bump version
run: |
if (fledge::bump_version(which = "dev", no_change_behavior = "noop")) {
fledge::finalize_version(push = TRUE)
}
shell: Rscript {0}
- name: Check release
run: |
fledge:::release_after_cran_built_binaries()
shell: Rscript {0}