|
67 | 67 | # extra-packages: |
|
68 | 68 | # ${{ steps.app-deps.outputs.pkgs }}
|
69 | 69 |
|
70 |
| - - name: Rtools version |
71 |
| - if: runner.os == 'Windows' |
72 |
| - id: rtools-version |
73 |
| - shell: Rscript {0} |
74 |
| - run: | |
75 |
| - # Get R version like `"4.2"` |
76 |
| - short_r_version <- sub("\\.\\d$", "", "${{ inputs.r-version }}") |
77 |
| - r_version <- package_version("${{ inputs.r-version }}") |
78 |
| - # For R versions >= 4.4.*, use Rtools v44 |
79 |
| - # For R versions == 4.3.*, use Rtools v43 |
80 |
| - # For R versions == 4.2.*, use Rtools v42 |
81 |
| - # Otherwise leave blank |
82 |
| -
|
83 |
| - # R version >= 4.2 |
84 |
| - value <- |
85 |
| - if (short_r_version == "4.4") { |
86 |
| - "44" |
87 |
| - } else if (short_r_version == "4.3") { |
88 |
| - "43" |
89 |
| - } else if (short_r_version == "4.2") { |
90 |
| - "42" |
91 |
| - } else { |
92 |
| - "" |
93 |
| - } |
94 |
| - if (nchar(value) > 0) { |
95 |
| - message("Using Rtools v", value) |
96 |
| - cat("value=", value, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE) |
97 |
| - } else { |
98 |
| - message("Not setting Rtools version!") |
99 |
| - } |
100 |
| -
|
101 | 70 | # We need to have the first repo to be `shinyverse` repo, then RSPM, then cran-url
|
102 | 71 | # Recreate logic from https://github.com/r-lib/actions/blob/413b6a4ba22b7bcaa726df1c8f88dcd574fbc8c4/setup-r/src/installer.ts#L598-L670
|
103 | 72 | # * Do not set RSPM input (use-public-rspm: false) to make `CRAN` repo the first repo
|
|
113 | 82 | cache-version: ${{ inputs.cache-version }}
|
114 | 83 | http-user-agent: ${{ inputs.http-user-agent }}
|
115 | 84 | pandoc-version: ${{ inputs.pandoc-version }}
|
116 |
| - rtools-version: ${{ steps.rtools-version.outputs.value }} |
117 | 85 | extra-packages:
|
118 | 86 | ${{ inputs.extra-packages }}
|
119 | 87 | use-public-rspm: false
|
|
0 commit comments