More error message fixes #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-Release | |
# runs when a tag v* is pushed | |
# creates a release draft with the binaries | |
on: | |
push: | |
branches: ["master"] | |
jobs: | |
build: # same as main.yml | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: true # abort pre-release if one build fails | |
matrix: | |
include: | |
- os: windows-latest | |
extension_out: .*\.zip | |
r_cmd: Rcmd | |
- os: ubuntu-latest | |
extension_out: .*\.tar\.gz | |
r_cmd: R CMD | |
- os: macos-latest | |
extension_out: .*\.tgz | |
r_cmd: R CMD | |
runs-on: ${{ matrix.os }} | |
env: | |
EXTENSION_IN: "*.tar.gz" # wildcards as used by R CMD | |
EXTENSION_OUT: ${{ matrix.extension_out }} # wildcards as used by grep | |
RCMD: ${{ matrix.r_cmd }} | |
PKG_NAME: vscDebugger | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Setup Pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install Dependencies | |
run: | | |
Rscript -e "install.packages('remotes', repos = 'https://cloud.r-project.org')" | |
Rscript -e "remotes::install_deps(dependencies = TRUE)" | |
- name: Build Package | |
run: $RCMD build . | |
- name: Compile Code | |
run: $RCMD INSTALL $PKG_NAME$EXTENSION_IN --build | |
- name: Identify output file # can be retrieved as steps.filenames.outputs.file_out | |
id: filenames | |
run: echo "file_out=$(ls | grep $PKG_NAME$EXTENSION_OUT | head -1)" >> $GITHUB_OUTPUT | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.filenames.outputs.file_out }} | |
path: ${{ steps.filenames.outputs.file_out }} | |
pre-release: | |
name: Pre-Release | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update tag | |
uses: richardsimko/update-tag@v1 | |
with: | |
tag_name: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: "artifacts/" | |
- name: Upload artifacts | |
uses: meeDamian/github-release@2.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: latest | |
commitish: master | |
name: Development Build | |
body: Contains the binaries from the latest push to master. | |
prerelease: true | |
files: "artifacts/*/*" | |
gzip: false | |
allow_override: true |