# Release from a dispatch event from the danklinux repo name: Create Release from DMS on: repository_dispatch: types: [dms_release] permissions: contents: write actions: 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" echo "${TAG}" > VERSION git add -A VERSION if ! git diff --cached --quiet; then git commit -m "Update VERSION to ${TAG} (from DMS)" fi git tag -f "${TAG}" git push origin HEAD git push -f origin "${TAG}" - 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:"%an|%s (%h)" | grep -v "^github-actions\[bot\]|" | sed 's/^[^|]*|/- /' | head -50) else CHANGELOG=$(git log --oneline --pretty=format:"%an|%s (%h)" "${PREVIOUS_TAG}..${TAG}" | grep -v "^github-actions\[bot\]|" | sed 's/^[^|]*|/- /') fi cat > RELEASE_BODY.md << 'EOF' ## Assets ### Complete Packages - **`dms-full-amd64.tar.gz`** - Complete package for x86_64 systems (CLI binaries + QML source + shell completions + installation guide) - **`dms-full-arm64.tar.gz`** - Complete package for ARM64 systems (CLI binaries + QML source + shell completions + 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-distropkg-amd64.gz`** - DMS CLI binary built with distro_package tag for AMD64 systems - **`dms-distropkg-arm64.gz`** - DMS CLI binary built with distro_package tag 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 and copy distropkg binaries for file in _dms_assets/dms-*.gz*; do if [ -f "$file" ]; then basename=$(basename "$file") if [[ "$basename" == dms-distropkg-* ]]; then cp "$file" "_release_assets/$basename" else newname=$(echo "$basename" | sed 's/^dms-/dms-cli-/') cp "$file" "_release_assets/$newname" fi 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) for arch in amd64 arm64; do mkdir -p _temp_full/dms mkdir -p _temp_full/bin mkdir -p _temp_full/completions tar -xzf _release_assets/dms-qml.tar.gz -C _temp_full/dms 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 if [ -f "_dms_assets/dms-distropkg-${arch}.gz" ]; then gunzip -c "_dms_assets/dms-distropkg-${arch}.gz" > _temp_full/bin/dms-distropkg chmod +x _temp_full/bin/dms-distropkg fi for completion in _dms_assets/completion.*; do if [ -f "$completion" ]; then cp "$completion" _temp_full/completions/ fi done 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 binaries:** ```bash sudo install -m 755 bin/dms /usr/local/bin/dms ``` 3. **Install shell completions (optional):** ```bash # Bash sudo install -m 644 completions/completion.bash /usr/share/bash-completion/completions/dms # Fish sudo install -m 644 completions/completion.fish /usr/share/fish/vendor_completions.d/dms.fish # Zsh sudo install -m 644 completions/completion.zsh /usr/share/zsh/site-functions/_dms ``` 4. **Start the shell:** ```bash dms run ``` ## 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 (cd _temp_full && tar -czf "../_release_assets/dms-full-${arch}.tar.gz" .) # 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 }}