ref:6404ef3ba0d8803a22a8532fc6147c30b1b98148

ci: add Cloudsmith packaging support (#5611)

SHA: 6404ef3ba0d8803a22a8532fc6147c30b1b98148
Author: Dave Lane <42013603+ReenigneArcher@users.noreply.github.com>
Date: 2026-09-04 22:16
Parents: 765fafd
9 files changed +188 -37
Type
.github/workflows/ci-cloudsmith.yml +46 −0
@@ -1,0 +1,46 @@
---
name: CI-Cloudsmith
permissions: {}
on:
workflow_call:
inputs:
release_tag:
description: GitHub release tag containing the DEB assets.
required: true
type: string
repository:
description: Cloudsmith repository slug.
required: true
type: string
secrets:
CLOUDSMITH_API_KEY:
required: true
jobs:
cloudsmith:
name: Cloudsmith
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Download release packages
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ inputs.release_tag }}
run: |
mkdir -p artifacts/packages
gh release download "${RELEASE_TAG}" \
--dir artifacts/packages \
--pattern '*.deb' \
--pattern '*.rpm'
- name: Upload packages to Cloudsmith
uses: LizardByte/actions/actions/cloudsmith_upload@f697f5b43d7787eca2cef681d314a2093cfa15e3 # master
with:
api_key: ${{ secrets.CLOUDSMITH_API_KEY }}
owner: lizardbyte
package_path: artifacts/packages
republish: true
repository: ${{ inputs.repository }}
.github/workflows/ci-copr.yml +0 −4
@@ -3,10 +3,6 @@
permissions: {}
on:
release:
types:
- prereleased
- released
workflow_call:
secrets:
COPR_BETA_WEBHOOK_TOKEN:
.github/workflows/ci-release.yml +40 −0
@@ -1,0 +1,40 @@
---
name: CI-Release
permissions: {}
on:
release:
types:
- prereleased
- released
concurrency:
group: "_${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
copr:
name: Copr
permissions:
contents: write # needed to update releases
uses: ./.github/workflows/ci-copr.yml
secrets:
COPR_BETA_WEBHOOK_TOKEN: ${{ secrets.COPR_BETA_WEBHOOK_TOKEN }}
COPR_STABLE_WEBHOOK_TOKEN: ${{ secrets.COPR_STABLE_WEBHOOK_TOKEN }}
COPR_CLI_CONFIG: ${{ secrets.COPR_CLI_CONFIG }}
VIRUSTOTAL_API_KEY: ${{ secrets.VIRUSTOTAL_API_KEY }}
cloudsmith:
name: Cloudsmith
if: >-
always() &&
startsWith(github.repository, 'LizardByte/')
needs: copr
permissions:
contents: read
uses: ./.github/workflows/ci-cloudsmith.yml
with:
release_tag: ${{ github.event.release.tag_name }}
repository: ${{ github.event.action == 'prereleased' && 'beta' || 'stable' }}
secrets:
CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
.github/workflows/ci.yml +1 −1
@@ -131,7 +131,7 @@
build-linux-copr:
name: Linux Copr
if: github.event_name != 'push' # releases are handled directly in ci-copr.yml
if: github.event_name != 'push' # releases are handled directly in ci-release.yml
needs: release-setup
permissions:
contents: write # needed to update releases
cmake/packaging/linux.cmake +6 −0
@@ -50,6 +50,12 @@
# RPM specific
set(CPACK_RPM_PACKAGE_LICENSE "GPLv3")
# DEB specific
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
if(DEFINED ENV{DEBIAN_PACKAGE_RELEASE}) # cmake-lint: disable=W0106
set(CPACK_DEBIAN_PACKAGE_RELEASE "$ENV{DEBIAN_PACKAGE_RELEASE}")
endif()
# FreeBSD specific
set(CPACK_FREEBSD_PACKAGE_MAINTAINER "${CPACK_PACKAGE_VENDOR}")
set(CPACK_FREEBSD_PACKAGE_ORIGIN "misc/${CPACK_PACKAGE_NAME}")
docker/debian.dockerfile +5 −2
@@ -41,14 +41,17 @@
FROM sunshine-deps AS sunshine-build
ARG BASE
ARG BRANCH
ARG BUILD_VERSION
ARG COMMIT
ARG TAG
# note: BUILD_VERSION may be blank
ENV BRANCH=${BRANCH}
ENV BUILD_VERSION=${BUILD_VERSION}
ENV COMMIT=${COMMIT}
ENV DEBIAN_PACKAGE_RELEASE=1+${BASE}${TAG}
# Now copy the full repository
COPY --link .. .
@@ -94,10 +97,10 @@
ARG TARGETARCH
# artifacts to be extracted in CI
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/*.deb /artifacts/
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /artifacts/sunshine-${BASE}-${TAG}-${TARGETARCH}.deb
# copy deb from builder
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/*.deb /sunshine.deb
COPY --link --from=sunshine-build /build/sunshine/build/cpack_artifacts/Sunshine.deb /sunshine.deb
# install sunshine
RUN <<_INSTALL_SUNSHINE
docs/getting_started.md +85 −29
@@ -50,6 +50,11 @@
### Linux
LizardByte publishes DEB and RPM packages to the
[stable Cloudsmith repository](https://cloudsmith.io/~lizardbyte/repos/stable/) for releases and the
[beta Cloudsmith repository](https://cloudsmith.io/~lizardbyte/repos/beta/) for prereleases. The packages also remain
available for manual download from each GitHub release.
**CUDA Compatibility**
CUDA is used for NVFBC capture.
@@ -68,28 +73,19 @@
<th>Package</th>
</tr>
<tr>
<td rowspan="5">13.1.1</td>
<td rowspan="5">590.48.01</td>
<td rowspan="5">50;52;60;61;62;70;72;75;80;86;87;89;90;100;101;103;120;121</td>
<td rowspan="8">13.1.1</td>
<td rowspan="8">590.48.01</td>
<td rowspan="8">50;52;60;61;62;70;72;75;80;86;87;89;90;100;101;103;120;121</td>
<td>sunshine.AppImage</td>
</tr>
<tr>
<td>sunshine_{version}-1+{distro}{distro-version}_{arch}.deb</td>
<td>sunshine-ubuntu-22.04-{arch}.deb</td>
</tr>
<tr>
<td>sunshine-ubuntu-24.04-{arch}.deb</td>
</tr>
<tr>
<td>sunshine-debian-trixie-{arch}.deb</td>
</tr>
<tr>
<td>sunshine_{arch}.flatpak</td>
</tr>
<tr>
<td>Sunshine (copr - Fedora)</td>
</tr>
<tr>
<td>Sunshine (copr - OpenSUSE)</td>
<td>Sunshine-{version}-1.{distro+version}.{arch}.rpm</td>
</tr>
<tr>
<td>sunshine.pkg.tar.zst</td>
@@ -159,16 +155,38 @@
```
#### Debian/Ubuntu
##### Install from Cloudsmith
Configure the `stable` repository for releases or the `beta` repository for prereleases. The setup script
automatically selects the appropriate Debian or Ubuntu release.
##### Install
Download `sunshine-{distro}-{distro-version}-{arch}.deb` and run the following command.
@tabs{
@tab_with_pipe{ Stable |:| ```bash
curl -1sLf 'https://dl.cloudsmith.io/public/lizardbyte/stable/cfg/setup/bash.deb.sh' | sudo -E bash
```}
@tab_with_pipe{ Beta |:| ```bash
curl -1sLf 'https://dl.cloudsmith.io/public/lizardbyte/beta/cfg/setup/bash.deb.sh' | sudo -E bash
```}
}
Install Sunshine after configuring the repository.
```bash
sudo dpkg -i ./sunshine-{distro}-{distro-version}-{arch}.deb
sudo apt update
sudo apt install sunshine
```
##### Install from GitHub releases
Download `sunshine_{version}-1+{distro}{distro-version}_{arch}.deb` and run the following command.
```bash
sudo dpkg -i ./sunshine_{version}-1+{distro}{distro-version}_{arch}.deb
```
> [!NOTE]
> The `{version}` is the Sunshine version. The `1+{distro}{distro-version}` suffix is the Debian package revision and
> identifies the distro used to build it. The `{arch}` is the architecture of your operating system.
> The `{distro-version}` is the version of the distro we built the package on. The `{arch}` is the
> architecture of your operating system.
> [!TIP]
> You can double-click the deb file to see details about the package and begin installation.
@@ -183,22 +201,60 @@
> [!TIP]
> The package name is case-sensitive.
##### Install (GitHub releases)
##### Install from Cloudsmith
Configure the `stable` repository for releases or the `beta` repository for prereleases. Cloudsmith's setup script
automatically selects Fedora or openSUSE and the appropriate release.
@tabs{
@tab_with_pipe{ Stable |:| ```bash
curl -1sLf 'https://dl.cloudsmith.io/public/lizardbyte/stable/cfg/setup/bash.rpm.sh' | sudo -E bash
```}
@tab_with_pipe{ Beta |:| ```bash
curl -1sLf 'https://dl.cloudsmith.io/public/lizardbyte/beta/cfg/setup/bash.rpm.sh' | sudo -E bash
```}
}
Install Sunshine with your distribution's package manager.
@tabs{
@tab{ Fedora | ```bash
sudo dnf install Sunshine
```}
@tab{ openSUSE | ```bash
sudo zypper install Sunshine
```}
}
##### Install from GitHub releases
Download `Sunshine-{version}-1.{distro+version}.{arch}.rpm` and run the following command.
Download `Sunshine-{version}.{distro+version}.{arch}.rpm` and run the following command.
```bash
sudo dnf install ./Sunshine-{version}.{distro}.{arch}.rpm
```
@tabs{
@tab{ Fedora | ```bash
sudo dnf install ./Sunshine-{version}-1.{distro+version}.{arch}.rpm
```}
@tab{ openSUSE | ```bash
sudo zypper install ./Sunshine-{version}-1.{distro+version}.{arch}.rpm
```}
}
> [!NOTE]
> The `{distro+version}` is the distro and distro version of the distro we built the package on. The `{arch}` is the
> architecture of your operating system.
> The `{version}` is the Sunshine version. The `1` is the RPM package release. The `{distro+version}` is the distro and
> distro version of the distro we built the package on. The `{arch}` is the architecture of your operating system.
> [!TIP]
> You can double-click the rpm file to see details about the package and begin installation.
##### Uninstall
@tabs{
```bash
sudo dnf remove sunshine
```
@tab{ Fedora | ```bash
sudo dnf remove Sunshine
```}
@tab{ openSUSE | ```bash
sudo zypper remove Sunshine
```}
}
##### Install (Copr)
docs/maintainers/release.md +5 −1
@@ -9,7 +9,9 @@
Wait for this build to succeed before continuing. You can view the status
[here](https://github.com/LizardByte/Sunshine/actions/workflows/ci-copr.yml?query=event%3Arelease)
3. Once the workflow mentioned in step 2 completes, it will update the GitHub release with the RPM files from the copr
build.
build. It also calls the separate [Cloudsmith workflow](https://github.com/LizardByte/Sunshine/actions/workflows/ci-cloudsmith.yml),
which publishes currently supported DEB and RPM packages to the
[beta Cloudsmith repo](https://cloudsmith.io/~lizardbyte/repos/beta/).
4. At this point, the GitHub release can be edited.
- Add any top-level release notes.
@@ -40,6 +42,8 @@
[Winget repo](https://github.com/microsoft/winget-pkgs/issues?q=is%3Apr%20is%3Aopen%20author%3ALizardByte-bot)
via a PR (we DO NOT have merge control)
- Build the new version in [stable copr repo](https://copr.fedorainfracloud.org/coprs/lizardbyte/stable/)
- Publish currently supported DEB and RPM packages to the
[stable Cloudsmith repo](https://cloudsmith.io/~lizardbyte/repos/stable/)
- Send release notification to Moonlight Discord server
6. X (Twitter) API is no longer free, so we must manually post the release there.
third-party/doxyconfig +0 −0