bump: version 1.7.4 - fix windows dialog scroll, batch import auto-st… #24
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version tag (e.g., v1.0.0)' | |
| required: true | |
| default: 'v1.0.0' | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_id: ${{ steps.create-release.outputs.id }} | |
| upload_url: ${{ steps.create-release.outputs.upload_url }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get version from tag | |
| id: get_version | |
| run: | | |
| if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
| echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Extract changelog for version | |
| id: changelog | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.version }}" | |
| VERSION_NUM="${VERSION#v}" | |
| echo "Looking for version: ${VERSION_NUM}" | |
| # Extract changelog section for this version | |
| # Match ## [VERSION] or ## [VERSION] - DATE format | |
| # Stop at next ## [ or end of file | |
| CHANGELOG=$(sed -n "/^## \[${VERSION_NUM}\]/,/^## \[/{ /^## \[${VERSION_NUM}\]/d; /^## \[/d; p; }" CHANGELOG.md) | |
| # Trim leading/trailing whitespace | |
| CHANGELOG=$(echo "$CHANGELOG" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') | |
| # Debug: show what we found | |
| echo "Extracted changelog:" | |
| echo "$CHANGELOG" | |
| # If no changelog found, use default message | |
| if [ -z "$CHANGELOG" ]; then | |
| CHANGELOG="See [CHANGELOG.md](https://github.com/novincode/dlman/blob/main/CHANGELOG.md) for details." | |
| fi | |
| # Write to file with download instructions + changelog | |
| { | |
| echo "## Downloads" | |
| echo "" | |
| echo "### Desktop App" | |
| echo "| Platform | File |" | |
| echo "|----------|------|" | |
| echo "| Windows | \`.msi\` or \`.exe\` |" | |
| echo "| macOS Intel | \`.dmg\` (x64) |" | |
| echo "| macOS Apple Silicon | \`.dmg\` (aarch64) |" | |
| echo "| Linux | \`.deb\` / \`.rpm\` / \`.AppImage\` |" | |
| echo "" | |
| echo "> **macOS:** Run \`xattr -cr /Applications/DLMan.app\` after install." | |
| echo "" | |
| echo "### Browser Extension" | |
| echo "| Browser | File |" | |
| echo "|---------|------|" | |
| echo "| Chrome / Edge / Brave | \`dlman-extension-chrome-*.zip\` |" | |
| echo "| Firefox | \`dlman-extension-firefox-*.zip\` |" | |
| echo "" | |
| echo "> **Install:** Extract and load as unpacked extension, or submit to browser stores." | |
| echo "" | |
| echo "---" | |
| echo "" | |
| echo "$CHANGELOG" | |
| } > /tmp/release_body.txt | |
| # Debug: show final body | |
| echo "Final release body:" | |
| cat /tmp/release_body.txt | |
| echo "changelog_file=/tmp/release_body.txt" >> $GITHUB_OUTPUT | |
| - name: Create Release | |
| id: create-release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.get_version.outputs.version }} | |
| name: DLMan ${{ steps.get_version.outputs.version }} | |
| body_path: /tmp/release_body.txt | |
| draft: false | |
| prerelease: false | |
| make_latest: true | |
| build-tauri: | |
| needs: create-release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest | |
| target: x86_64-apple-darwin | |
| args: '--target x86_64-apple-darwin' | |
| - platform: macos-latest | |
| target: aarch64-apple-darwin | |
| args: '--target aarch64-apple-darwin' | |
| - platform: ubuntu-22.04 | |
| target: x86_64-unknown-linux-gnu | |
| args: '' | |
| - platform: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| args: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: '. -> target' | |
| - name: Install Rust target (macOS cross-compile) | |
| if: matrix.platform == 'macos-latest' | |
| run: rustup target add ${{ matrix.target }} | |
| - name: Install dependencies (Ubuntu) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| # Remove problematic Microsoft repos that cause 403 errors | |
| sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list | |
| sudo rm -f /etc/apt/sources.list.d/azure-cli.list | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf \ | |
| libgtk-3-dev | |
| - name: Install frontend dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| releaseId: ${{ needs.create-release.outputs.release_id }} | |
| projectPath: apps/desktop | |
| tauriScript: pnpm tauri | |
| build-extension: | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Get version | |
| id: get_version | |
| run: | | |
| if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then | |
| echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Update extension version | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.version }}" | |
| VERSION_NUM="${VERSION#v}" | |
| cd apps/extension | |
| # Update version in package.json and wxt.config.ts manifest | |
| sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"${VERSION_NUM}\"/" package.json | |
| sed -i "s/version: '[^']*'/version: '${VERSION_NUM}'/" wxt.config.ts | |
| - name: Build Chrome extension | |
| run: | | |
| cd apps/extension | |
| pnpm build | |
| - name: Build Firefox extension | |
| run: | | |
| cd apps/extension | |
| pnpm build:firefox | |
| - name: Get version for filename | |
| id: version_filename | |
| run: | | |
| VERSION="${{ steps.get_version.outputs.version }}" | |
| VERSION_NUM="${VERSION#v}" | |
| echo "version_num=${VERSION_NUM}" >> $GITHUB_OUTPUT | |
| - name: Package extensions | |
| run: | | |
| VERSION="${{ steps.version_filename.outputs.version_num }}" | |
| cd apps/extension | |
| # Package Chrome extension | |
| cd .output/chrome-mv3 | |
| zip -r "../../dlman-extension-chrome-${VERSION}.zip" . | |
| cd ../.. | |
| # Package Firefox extension | |
| cd .output/firefox-mv2 | |
| zip -r "../../dlman-extension-firefox-${VERSION}.zip" . | |
| cd ../.. | |
| - name: Upload extensions to release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.get_version.outputs.version }} | |
| files: | | |
| apps/extension/dlman-extension-chrome-*.zip | |
| apps/extension/dlman-extension-firefox-*.zip |