# Release from a dispatch event from the danklinux repo name: Create Release from DMS on: repository_dispatch: types: [dms_release] permissions: contents: write concurrency: group: release-${{ github.event.client_payload.tag }} cancel-in-progress: true jobs: create_release_from_dms: runs-on: ubuntu-24.04 env: TAG: ${{ github.event.client_payload.tag }} DMS_REPO: ${{ github.event.client_payload.dms_repo }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Ensure VERSION and tag run: | set -euxo pipefail git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" # create/update VERSION file to match incoming tag echo "${TAG}" > VERSION if ! git diff --quiet -- VERSION; then git add VERSION git commit -m "Add VERSION file for ${TAG} (from DMS)" fi # If tag doesn't exist (or differs), (re)create it if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null; then echo "Tag ${TAG} already exists" else git tag "${TAG}" fi # Push commit (if any) and tag git push --follow-tags origin HEAD - name: Generate Changelog id: changelog run: | set -e PREVIOUS_TAG=$(git describe --tags --abbrev=0 "${TAG}^" 2>/dev/null || echo "") if [ -z "$PREVIOUS_TAG" ]; then CHANGELOG=$(git log --oneline --pretty=format:"- %s (%h)" | head -50) else CHANGELOG=$(git log --oneline --pretty=format:"- %s (%h)" "${PREVIOUS_TAG}..${TAG}") fi cat > RELEASE_BODY.md << 'EOF' ## Assets ### Complete Packages - **`dms-full-amd64.tar.gz`** - Complete package for x86_64 systems (CLI binary + QML source + installation guide) - **`dms-full-arm64.tar.gz`** - Complete package for ARM64 systems (CLI binary + QML source + installation guide) ### Individual Components - **`dms-cli-amd64.gz`** - DMS CLI binary for x86_64 systems - **`dms-cli-arm64.gz`** - DMS CLI binary for ARM64 systems - **`dms-qml.tar.gz`** - QML source code only ### Checksums - **`*.sha256`** - SHA256 checksums for verifying download integrity **Installation:** Extract the `dms-full-*.tar.gz` package for your architecture and follow the `INSTALL.md` instructions inside. --- EOF cat >> RELEASE_BODY.md << EOF ## What's Changed $CHANGELOG **Full Changelog**: https://github.com/${{ github.repository }}/compare/${PREVIOUS_TAG}...${TAG} EOF echo "changelog<> $GITHUB_OUTPUT cat RELEASE_BODY.md >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - name: Create/Update DankMaterialShell Release uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.TAG }} name: Release ${{ env.TAG }} body: ${{ steps.changelog.outputs.changelog }} draft: false prerelease: ${{ contains(env.TAG, '-') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Download and prepare release assets env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euxo pipefail mkdir -p _release_assets # Download DMS CLI binaries from the danklinux repo gh release download "${TAG}" -R "${DMS_REPO}" --dir ./_dms_assets # Rename CLI binaries to dms-cli-* format for file in _dms_assets/dms-*.gz*; do if [ -f "$file" ]; then basename=$(basename "$file") # dms-amd64.gz -> dms-cli-amd64.gz # dms-amd64.gz.sha256 -> dms-cli-amd64.gz.sha256 newname=$(echo "$basename" | sed 's/^dms-/dms-cli-/') cp "$file" "_release_assets/$newname" fi done # Create QML source package (exclude .git, .github, build artifacts) tar --exclude='.git' \ --exclude='.github' \ --exclude='_dms_assets' \ --exclude='_release_assets' \ --exclude='*.tar.gz' \ -czf _release_assets/dms-qml.tar.gz . # Generate checksum for QML package (cd _release_assets && sha256sum dms-qml.tar.gz > dms-qml.tar.gz.sha256) # Create full packages for each architecture for arch in amd64 arm64; do mkdir -p _temp_full/dms mkdir -p _temp_full/bin # Extract QML source to temp directory tar -xzf _release_assets/dms-qml.tar.gz -C _temp_full/dms # Copy CLI binary if it exists if [ -f "_dms_assets/dms-${arch}.gz" ]; then gunzip -c "_dms_assets/dms-${arch}.gz" > _temp_full/bin/dms chmod +x _temp_full/bin/dms fi # Create INSTALL.md cat > _temp_full/INSTALL.md << 'EOF' # DankMaterialShell Installation ## Requirements - Wayland compositor (niri or Hyprland recommended) - Quickshell framework - Qt6 ## Installation Steps 1. **Install quickshell assets:** ```bash mkdir -p ~/.config/quickshell cp -r dms ~/.config/quickshell/ ``` 2. **Install the DMS CLI binary:** ```bash sudo install -m 755 bin/dms /usr/local/bin/dms # or install to a local directory: mkdir -p ~/.local/bin install -m 755 bin/dms ~/.local/bin/dms ``` 3. **Start the shell:** ```bash dms run # or directly with quickshell (will lack some dbus integrations & plugin management): quickshell -p ~/.config/quickshell/dms ``` ## Configuration - Settings are stored in `~/.config/DankMaterialShell/settings.json` - Plugins go in `~/.config/DankMaterialShell/plugins/` - See the documentation in the `dms/` directory for more details ## Troubleshooting - Run with verbose output: `quickshell -v -p ~/.config/quickshell/dms` - Check logs in `~/.local/state/DankMaterialShell/` - Ensure all dependencies are installed EOF # Create the full package with proper RPM structure (dms-VERSION/ top-level directory) mkdir -p dms-${TAG} cp -r _temp_full/* dms-${TAG}/ tar -czf _release_assets/dms-full-${arch}.tar.gz dms-${TAG} rm -rf dms-${TAG} # Generate checksum (cd _release_assets && sha256sum "dms-full-${arch}.tar.gz" > "dms-full-${arch}.tar.gz.sha256") # Cleanup rm -rf _temp_full done - name: Attach all assets to release uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.TAG }} files: _release_assets/** env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup RPM build environment run: | sudo apt-get update sudo apt-get install -y rpm wget curl jq # Setup rpmbuild tree mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} - name: Prepare RPM sources run: | cd ~/rpmbuild/SOURCES VERSION="${{ env.TAG }}" # Copy the full packages (already have proper RPM structure) cp _release_assets/dms-full-amd64.tar.gz dms-${VERSION}-amd64.tar.gz cp _release_assets/dms-full-arm64.tar.gz dms-${VERSION}-arm64.tar.gz echo "✅ Prepared tarballs for RPM" ls -lh ~/rpmbuild/SOURCES/ - name: Create RPM spec file run: | VERSION="${{ env.TAG }}" cat > ~/rpmbuild/SPECS/dms.spec << 'SPECFILE' %global debug_package %{nil} Name: dms Version: VERSION_PLACEHOLDER Release: 1%{?dist} Summary: Dank Material Shell - Modern desktop environment License: GPL-3.0-or-later URL: https://github.com/AvengeMedia/DankMaterialShell Source0: dms-VERSION_PLACEHOLDER-amd64.tar.gz Source1: dms-VERSION_PLACEHOLDER-arm64.tar.gz BuildArch: %{_arch} Requires: qt6-qtbase Requires: qt6-qtdeclarative Requires: qt6-qtwayland Requires: quickshell %description Dank Material Shell is a modern, Material Design-inspired desktop environment for Linux systems built with Qt6 and QML. It provides a complete shell experience with dynamic theming, plugin support, and integration with Wayland compositors. %prep %setup -q %build # Pre-compiled binaries, no build step needed %install mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/quickshell/dms # Install DMS CLI binary for current architecture if [ -f bin/dms ]; then install -m 755 bin/dms %{buildroot}%{_bindir}/dms fi # Install QML/data files if [ -d dms ]; then cp -r dms/* %{buildroot}%{_datadir}/quickshell/dms/ fi # Install documentation if [ -f INSTALL.md ]; then mkdir -p %{buildroot}%{_docdir}/%{name} install -m 644 INSTALL.md %{buildroot}%{_docdir}/%{name}/ fi %files %{_bindir}/dms %{_datadir}/quickshell/dms/ %doc %{_docdir}/%{name}/INSTALL.md %changelog * CHANGELOG_DATE_PLACEHOLDER GitHub Actions - VERSION_PLACEHOLDER-1 - Automated build from release VERSION_PLACEHOLDER SPECFILE # Replace placeholders CHANGELOG_DATE=$(date '+%a %b %d %Y') sed -i "s/VERSION_PLACEHOLDER/$VERSION/g" ~/rpmbuild/SPECS/dms.spec sed -i "s/CHANGELOG_DATE_PLACEHOLDER/$CHANGELOG_DATE/g" ~/rpmbuild/SPECS/dms.spec - name: Build SRPM run: | cd ~/rpmbuild/SPECS rpmbuild -bs dms.spec echo "✅ SRPM built successfully" ls -lh ~/rpmbuild/SRPMS/ - name: Upload to Copr if: success() run: | cd ~/rpmbuild/SRPMS copr-cli build dms dms-*.src.rpm echo "✅ Uploaded to Copr successfully"