Publish packages
Upload package tarballs from the dashboard or GitHub Actions.
Private package publishing is available to organizations in the dashboard.
Use the dashboard for manual uploads. Use GitHub Actions when you want to publish from tags or release workflows.
Required secrets
Store these values as GitHub Actions secrets:
RREPO_REPOSITORY_URL, such ashttps://acme.rrepo.dev/internalRREPO_API_KEY, withpackages:write
Upload endpoint
Append /upload to the repository URL.
https://<org-slug>.rrepo.dev/<repo-slug>/upload
Example workflow
name: publish-package
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Build source package
shell: bash
run: |
mkdir -p dist
R CMD build . --output=dist
- name: Upload package to rrepo
shell: bash
env:
RREPO_REPOSITORY_URL: ${{ secrets.RREPO_REPOSITORY_URL }}
RREPO_API_KEY: ${{ secrets.RREPO_API_KEY }}
run: |
PACKAGE_TARBALL=$(ls dist/*.tar.gz)
curl --fail \
--request POST \
--header "Authorization: Bearer ${RREPO_API_KEY}" \
--form "file=@${PACKAGE_TARBALL}" \
"${RREPO_REPOSITORY_URL%/}/upload"