1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 13:32:50 -05:00

ci: disable pkg builds from main release wf

This commit is contained in:
bbedward
2025-12-12 10:16:24 -05:00
parent 119b5df6df
commit 73cf3130e1

View File

@@ -4,7 +4,7 @@ on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
tag: tag:
description: 'Tag to release (e.g., v1.0.1)' description: "Tag to release (e.g., v1.0.1)"
required: true required: true
type: string type: string
@@ -396,296 +396,296 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
trigger-obs-update: # trigger-obs-update:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
needs: release # needs: release
env: # env:
TAG: ${{ inputs.tag }} # TAG: ${{ inputs.tag }}
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
ref: ${{ inputs.tag }} # ref: ${{ inputs.tag }}
- name: Install OSC # - name: Install OSC
run: | # run: |
sudo apt-get update # sudo apt-get update
sudo apt-get install -y osc # sudo apt-get install -y osc
mkdir -p ~/.config/osc # mkdir -p ~/.config/osc
cat > ~/.config/osc/oscrc << EOF # cat > ~/.config/osc/oscrc << EOF
[general] # [general]
apiurl = https://api.opensuse.org # apiurl = https://api.opensuse.org
[https://api.opensuse.org] # [https://api.opensuse.org]
user = ${{ secrets.OBS_USERNAME }} # user = ${{ secrets.OBS_USERNAME }}
pass = ${{ secrets.OBS_PASSWORD }} # pass = ${{ secrets.OBS_PASSWORD }}
EOF # EOF
chmod 600 ~/.config/osc/oscrc # chmod 600 ~/.config/osc/oscrc
- name: Update OBS packages # - name: Update OBS packages
run: | # run: |
cd distro # cd distro
bash scripts/obs-upload.sh dms "Update to ${TAG}" # bash scripts/obs-upload.sh dms "Update to ${TAG}"
trigger-ppa-update: # trigger-ppa-update:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
needs: release # needs: release
env: # env:
TAG: ${{ inputs.tag }} # TAG: ${{ inputs.tag }}
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
ref: ${{ inputs.tag }} # ref: ${{ inputs.tag }}
- name: Install build dependencies # - name: Install build dependencies
run: | # run: |
sudo apt-get update # sudo apt-get update
sudo apt-get install -y \ # sudo apt-get install -y \
debhelper \ # debhelper \
devscripts \ # devscripts \
dput \ # dput \
lftp \ # lftp \
build-essential \ # build-essential \
fakeroot \ # fakeroot \
dpkg-dev # dpkg-dev
- name: Configure GPG # - name: Configure GPG
env: # env:
GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }} # GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
run: | # run: |
echo "$GPG_KEY" | gpg --import # echo "$GPG_KEY" | gpg --import
GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2) # GPG_KEY_ID=$(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2)
echo "DEBSIGN_KEYID=$GPG_KEY_ID" >> $GITHUB_ENV # echo "DEBSIGN_KEYID=$GPG_KEY_ID" >> $GITHUB_ENV
- name: Upload to PPA # - name: Upload to PPA
run: | # run: |
cd distro/ubuntu/ppa # cd distro/ubuntu/ppa
bash create-and-upload.sh ../dms dms questing # bash create-and-upload.sh ../dms dms questing
copr-build: # copr-build:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
needs: release # needs: release
env: # env:
TAG: ${{ inputs.tag }} # TAG: ${{ inputs.tag }}
steps: # steps:
- name: Checkout repository # - name: Checkout repository
uses: actions/checkout@v4 # uses: actions/checkout@v4
with: # with:
ref: ${{ inputs.tag }} # ref: ${{ inputs.tag }}
- name: Determine version # - name: Determine version
id: version # id: version
run: | # run: |
VERSION="${TAG#v}" # VERSION="${TAG#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT # echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Building DMS stable version: $VERSION" # echo "Building DMS stable version: $VERSION"
- name: Setup build environment # - name: Setup build environment
run: | # run: |
sudo apt-get update # sudo apt-get update
sudo apt-get install -y rpm wget curl jq gzip # sudo apt-get install -y rpm wget curl jq gzip
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} # mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
- name: Download release assets # - name: Download release assets
run: | # run: |
VERSION="${{ steps.version.outputs.version }}" # VERSION="${{ steps.version.outputs.version }}"
cd ~/rpmbuild/SOURCES # cd ~/rpmbuild/SOURCES
wget "https://github.com/AvengeMedia/DankMaterialShell/releases/download/v${VERSION}/dms-qml.tar.gz" || { # wget "https://github.com/AvengeMedia/DankMaterialShell/releases/download/v${VERSION}/dms-qml.tar.gz" || {
echo "Failed to download dms-qml.tar.gz for v${VERSION}" # echo "Failed to download dms-qml.tar.gz for v${VERSION}"
exit 1 # exit 1
} # }
- name: Generate stable spec file # - name: Generate stable spec file
run: | # run: |
VERSION="${{ steps.version.outputs.version }}" # VERSION="${{ steps.version.outputs.version }}"
CHANGELOG_DATE="$(date '+%a %b %d %Y')" # CHANGELOG_DATE="$(date '+%a %b %d %Y')"
cat > ~/rpmbuild/SPECS/dms.spec <<'SPECEOF' # cat > ~/rpmbuild/SPECS/dms.spec <<'SPECEOF'
# Spec for DMS stable releases - Generated by GitHub Actions # # Spec for DMS stable releases - Generated by GitHub Actions
%global debug_package %{nil} # %global debug_package %{nil}
%global version VERSION_PLACEHOLDER # %global version VERSION_PLACEHOLDER
%global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors # %global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors
Name: dms # Name: dms
Version: %{version} # Version: %{version}
Release: 1%{?dist} # Release: 1%{?dist}
Summary: %{pkg_summary} # Summary: %{pkg_summary}
License: MIT # License: MIT
URL: https://github.com/AvengeMedia/DankMaterialShell # URL: https://github.com/AvengeMedia/DankMaterialShell
Source0: dms-qml.tar.gz # Source0: dms-qml.tar.gz
BuildRequires: gzip # BuildRequires: gzip
BuildRequires: wget # BuildRequires: wget
BuildRequires: systemd-rpm-macros # BuildRequires: systemd-rpm-macros
Requires: (quickshell or quickshell-git) # Requires: (quickshell or quickshell-git)
Requires: accountsservice # Requires: accountsservice
Requires: dms-cli = %{version}-%{release} # Requires: dms-cli = %{version}-%{release}
Requires: dgop # Requires: dgop
Recommends: cava # Recommends: cava
Recommends: cliphist # Recommends: cliphist
Recommends: danksearch # Recommends: danksearch
Recommends: matugen # Recommends: matugen
Recommends: wl-clipboard # Recommends: wl-clipboard
Recommends: NetworkManager # Recommends: NetworkManager
Recommends: qt6-qtmultimedia # Recommends: qt6-qtmultimedia
Suggests: qt6ct # Suggests: qt6ct
%description # %description
DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell # DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell
and optimized for the niri and hyprland compositors. Features notifications, # and optimized for the niri and hyprland compositors. Features notifications,
app launcher, wallpaper customization, and fully customizable with plugins. # app launcher, wallpaper customization, and fully customizable with plugins.
Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets, # Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets,
process monitoring, notification center, clipboard history, dock, control center, # process monitoring, notification center, clipboard history, dock, control center,
lock screen, and comprehensive plugin system. # lock screen, and comprehensive plugin system.
%package -n dms-cli # %package -n dms-cli
Summary: DankMaterialShell CLI tool # Summary: DankMaterialShell CLI tool
License: MIT # License: MIT
URL: https://github.com/AvengeMedia/DankMaterialShell # URL: https://github.com/AvengeMedia/DankMaterialShell
%description -n dms-cli # %description -n dms-cli
Command-line interface for DankMaterialShell configuration and management. # Command-line interface for DankMaterialShell configuration and management.
Provides native DBus bindings, NetworkManager integration, and system utilities. # Provides native DBus bindings, NetworkManager integration, and system utilities.
%prep # %prep
%setup -q -c -n dms-qml # %setup -q -c -n dms-qml
# Download architecture-specific binaries during build # # Download architecture-specific binaries during build
case "%{_arch}" in # case "%{_arch}" in
x86_64) # x86_64)
ARCH_SUFFIX="amd64" # ARCH_SUFFIX="amd64"
;; # ;;
aarch64) # aarch64)
ARCH_SUFFIX="arm64" # ARCH_SUFFIX="arm64"
;; # ;;
*) # *)
echo "Unsupported architecture: %{_arch}" # echo "Unsupported architecture: %{_arch}"
exit 1 # exit 1
;; # ;;
esac # esac
wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/DankMaterialShell/releases/latest/download/dms-distropkg-${ARCH_SUFFIX}.gz" || { # wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/DankMaterialShell/releases/latest/download/dms-distropkg-${ARCH_SUFFIX}.gz" || {
echo "Failed to download dms-cli for architecture %{_arch}" # echo "Failed to download dms-cli for architecture %{_arch}"
exit 1 # exit 1
} # }
gunzip -c %{_builddir}/dms-cli.gz > %{_builddir}/dms-cli # gunzip -c %{_builddir}/dms-cli.gz > %{_builddir}/dms-cli
chmod +x %{_builddir}/dms-cli # chmod +x %{_builddir}/dms-cli
%build # %build
%install # %install
install -Dm755 %{_builddir}/dms-cli %{buildroot}%{_bindir}/dms # install -Dm755 %{_builddir}/dms-cli %{buildroot}%{_bindir}/dms
install -d %{buildroot}%{_datadir}/bash-completion/completions # install -d %{buildroot}%{_datadir}/bash-completion/completions
install -d %{buildroot}%{_datadir}/zsh/site-functions # install -d %{buildroot}%{_datadir}/zsh/site-functions
install -d %{buildroot}%{_datadir}/fish/vendor_completions.d # install -d %{buildroot}%{_datadir}/fish/vendor_completions.d
%{_builddir}/dms-cli completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : # %{_builddir}/dms-cli completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || :
%{_builddir}/dms-cli completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : # %{_builddir}/dms-cli completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || :
%{_builddir}/dms-cli completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : # %{_builddir}/dms-cli completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || :
install -Dm644 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service # install -Dm644 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service
install -Dm644 assets/dms-open.desktop %{buildroot}%{_datadir}/applications/dms-open.desktop # install -Dm644 assets/dms-open.desktop %{buildroot}%{_datadir}/applications/dms-open.desktop
install -Dm644 assets/danklogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg # install -Dm644 assets/danklogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
install -dm755 %{buildroot}%{_datadir}/quickshell/dms # install -dm755 %{buildroot}%{_datadir}/quickshell/dms
cp -r %{_builddir}/dms-qml/* %{buildroot}%{_datadir}/quickshell/dms/ # cp -r %{_builddir}/dms-qml/* %{buildroot}%{_datadir}/quickshell/dms/
rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* # rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git*
rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore # rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore
rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github # rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github
rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro # rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro
echo "%{version}" > %{buildroot}%{_datadir}/quickshell/dms/VERSION # echo "%{version}" > %{buildroot}%{_datadir}/quickshell/dms/VERSION
%posttrans # %posttrans
if [ -d "%{_sysconfdir}/xdg/quickshell/dms" ]; then # if [ -d "%{_sysconfdir}/xdg/quickshell/dms" ]; then
rmdir "%{_sysconfdir}/xdg/quickshell/dms" 2>/dev/null || true # rmdir "%{_sysconfdir}/xdg/quickshell/dms" 2>/dev/null || true
rmdir "%{_sysconfdir}/xdg/quickshell" 2>/dev/null || true # rmdir "%{_sysconfdir}/xdg/quickshell" 2>/dev/null || true
rmdir "%{_sysconfdir}/xdg" 2>/dev/null || true # rmdir "%{_sysconfdir}/xdg" 2>/dev/null || true
fi # fi
# Signal running DMS instances to reload # # Signal running DMS instances to reload
pkill -USR1 -x dms >/dev/null 2>&1 || : # pkill -USR1 -x dms >/dev/null 2>&1 || :
%files # %files
%license LICENSE # %license LICENSE
%doc README.md CONTRIBUTING.md # %doc README.md CONTRIBUTING.md
%{_datadir}/quickshell/dms/ # %{_datadir}/quickshell/dms/
%{_userunitdir}/dms.service # %{_userunitdir}/dms.service
%{_datadir}/applications/dms-open.desktop # %{_datadir}/applications/dms-open.desktop
%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg # %{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
%files -n dms-cli # %files -n dms-cli
%{_bindir}/dms # %{_bindir}/dms
%{_datadir}/bash-completion/completions/dms # %{_datadir}/bash-completion/completions/dms
%{_datadir}/zsh/site-functions/_dms # %{_datadir}/zsh/site-functions/_dms
%{_datadir}/fish/vendor_completions.d/dms.fish # %{_datadir}/fish/vendor_completions.d/dms.fish
%changelog # %changelog
* CHANGELOG_DATE_PLACEHOLDER AvengeMedia <contact@avengemedia.com> - VERSION_PLACEHOLDER-1 # * CHANGELOG_DATE_PLACEHOLDER AvengeMedia <contact@avengemedia.com> - VERSION_PLACEHOLDER-1
- Stable release VERSION_PLACEHOLDER # - Stable release VERSION_PLACEHOLDER
- Built from GitHub release # - Built from GitHub release
SPECEOF # SPECEOF
sed -i "s/VERSION_PLACEHOLDER/${VERSION}/g" ~/rpmbuild/SPECS/dms.spec # sed -i "s/VERSION_PLACEHOLDER/${VERSION}/g" ~/rpmbuild/SPECS/dms.spec
sed -i "s/CHANGELOG_DATE_PLACEHOLDER/${CHANGELOG_DATE}/g" ~/rpmbuild/SPECS/dms.spec # sed -i "s/CHANGELOG_DATE_PLACEHOLDER/${CHANGELOG_DATE}/g" ~/rpmbuild/SPECS/dms.spec
- name: Build SRPM # - name: Build SRPM
id: build # id: build
run: | # run: |
cd ~/rpmbuild/SPECS # cd ~/rpmbuild/SPECS
rpmbuild -bs dms.spec # rpmbuild -bs dms.spec
SRPM=$(ls ~/rpmbuild/SRPMS/*.src.rpm | tail -n 1) # SRPM=$(ls ~/rpmbuild/SRPMS/*.src.rpm | tail -n 1)
SRPM_NAME=$(basename "$SRPM") # SRPM_NAME=$(basename "$SRPM")
echo "srpm_path=$SRPM" >> $GITHUB_OUTPUT # echo "srpm_path=$SRPM" >> $GITHUB_OUTPUT
echo "srpm_name=$SRPM_NAME" >> $GITHUB_OUTPUT # echo "srpm_name=$SRPM_NAME" >> $GITHUB_OUTPUT
echo "SRPM built: $SRPM_NAME" # echo "SRPM built: $SRPM_NAME"
- name: Upload SRPM artifact # - name: Upload SRPM artifact
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: dms-stable-srpm-${{ steps.version.outputs.version }} # name: dms-stable-srpm-${{ steps.version.outputs.version }}
path: ${{ steps.build.outputs.srpm_path }} # path: ${{ steps.build.outputs.srpm_path }}
retention-days: 90 # retention-days: 90
- name: Install Copr CLI # - name: Install Copr CLI
run: | # run: |
sudo apt-get install -y python3-pip # sudo apt-get install -y python3-pip
pip3 install copr-cli # pip3 install copr-cli
mkdir -p ~/.config # mkdir -p ~/.config
cat > ~/.config/copr << EOF # cat > ~/.config/copr << EOF
[copr-cli] # [copr-cli]
login = ${{ secrets.COPR_LOGIN }} # login = ${{ secrets.COPR_LOGIN }}
username = avengemedia # username = avengemedia
token = ${{ secrets.COPR_TOKEN }} # token = ${{ secrets.COPR_TOKEN }}
copr_url = https://copr.fedorainfracloud.org # copr_url = https://copr.fedorainfracloud.org
EOF # EOF
chmod 600 ~/.config/copr # chmod 600 ~/.config/copr
- name: Upload to Copr # - name: Upload to Copr
run: | # run: |
SRPM="${{ steps.build.outputs.srpm_path }}" # SRPM="${{ steps.build.outputs.srpm_path }}"
VERSION="${{ steps.version.outputs.version }}" # VERSION="${{ steps.version.outputs.version }}"
echo "Uploading SRPM to avengemedia/dms..." # echo "Uploading SRPM to avengemedia/dms..."
BUILD_OUTPUT=$(copr-cli build avengemedia/dms "$SRPM" --nowait 2>&1) # BUILD_OUTPUT=$(copr-cli build avengemedia/dms "$SRPM" --nowait 2>&1)
echo "$BUILD_OUTPUT" # echo "$BUILD_OUTPUT"
BUILD_ID=$(echo "$BUILD_OUTPUT" | grep -oP 'Build was added to.*\K[0-9]+' || echo "unknown") # BUILD_ID=$(echo "$BUILD_OUTPUT" | grep -oP 'Build was added to.*\K[0-9]+' || echo "unknown")
if [ "$BUILD_ID" != "unknown" ]; then # if [ "$BUILD_ID" != "unknown" ]; then
echo "Build submitted: https://copr.fedorainfracloud.org/coprs/avengemedia/dms/build/$BUILD_ID/" # echo "Build submitted: https://copr.fedorainfracloud.org/coprs/avengemedia/dms/build/$BUILD_ID/"
fi # fi