Skip to content

feat: let users specify which topics deserve more depth in generated … #39

feat: let users specify which topics deserve more depth in generated …

feat: let users specify which topics deserve more depth in generated … #39

Workflow file for this run

name: Release Build
on:
push:
branches:
- main
- master
tags:
- 'v*'
permissions:
contents: write
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install Node.js dependencies and build frontend
run: |
npm ci --legacy-peer-deps
npm run build
- name: Install Poetry
run: |
pip install poetry==2.4.1
- name: Install Python dependencies
working-directory: api
run: |
poetry config virtualenvs.create false
poetry install --only main
pip install pyinstaller
- name: Prepare build assets
run: |
python scripts/prepare_assets.py windows
- name: Build with PyInstaller
run: |
pyinstaller hackdeepwiki.spec
- name: Rename and upload Windows binary
uses: actions/upload-artifact@v4
with:
name: hackdeepwiki-windows
path: dist/hackdeepwiki.exe
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install Node.js dependencies and build frontend
run: |
npm ci --legacy-peer-deps
npm run build
- name: Install Poetry
run: |
pip install poetry==2.4.1
- name: Install Python dependencies
working-directory: api
run: |
poetry config virtualenvs.create false
poetry install --only main
pip install pyinstaller
- name: Prepare build assets
run: |
python scripts/prepare_assets.py linux
- name: Build with PyInstaller
run: |
pyinstaller hackdeepwiki.spec
- name: Package AppImage
run: |
# 1. Create AppDir structure
mkdir -p AppDir/usr/bin
# 2. Copy launcher (onedir build: a folder containing the exe +
# _internal/, not a single file) and assets
cp -r dist/hackdeepwiki/. AppDir/usr/bin/
cp public/hackdeepwiki.png AppDir/hackdeepwiki.png
# 3. Create AppRun script
cat << 'EOF' > AppDir/AppRun
#!/bin/sh
SELF=$(readlink -f "$0")
HERE=$(dirname "$SELF")
exec "$HERE/usr/bin/hackdeepwiki" "$@"
EOF
chmod +x AppDir/AppRun
# 4. Create desktop entry
cat << 'EOF' > AppDir/hackdeepwiki.desktop
[Desktop Entry]
Name=HackDeepWiki
Exec=hackdeepwiki
Icon=hackdeepwiki
Type=Application
Categories=Development;
Comment=AI-powered wiki generation and code analysis
Terminal=true
EOF
# 5. Download and run appimagetool
curl -LO https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
export APPIMAGE_EXTRACT_AND_RUN=1
./appimagetool-x86_64.AppImage --no-appstream AppDir HackDeepWiki-x86_64.AppImage
- name: Upload Linux AppImage
uses: actions/upload-artifact@v4
with:
name: hackdeepwiki-linux
path: HackDeepWiki-x86_64.AppImage
publish-release:
runs-on: ubuntu-latest
needs: [build-windows, build-linux]
steps:
- name: Download Windows binary
uses: actions/download-artifact@v4
with:
name: hackdeepwiki-windows
path: ./artifacts/windows
- name: Download Linux AppImage
uses: actions/download-artifact@v4
with:
name: hackdeepwiki-linux
path: ./artifacts/linux
- name: Setup environment for Release
run: |
# Arrange files
mv ./artifacts/windows/hackdeepwiki.exe ./HackDeepWiki-windows-x64.exe
mv ./artifacts/linux/HackDeepWiki-x86_64.AppImage ./HackDeepWiki-x86_64.AppImage
# Check if this is a tag or a commit push
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "TAG_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
echo "RELEASE_NAME=Release ${{ github.ref_name }}" >> $GITHUB_ENV
echo "IS_PRERELEASE=false" >> $GITHUB_ENV
else
echo "TAG_NAME=pre-release" >> $GITHUB_ENV
echo "RELEASE_NAME=Latest Pre-release (Development Build)" >> $GITHUB_ENV
echo "IS_PRERELEASE=true" >> $GITHUB_ENV
fi
- name: Remove legacy FreeDeepWiki assets
# This repo used to be called FreeDeepWiki -- action-gh-release below
# only uploads/replaces the files it's given, it never deletes assets
# under a different name, so the old FreeDeepWiki-windows-x64.exe /
# FreeDeepWiki-x86_64.AppImage from before the rename kept sitting in
# the "continuous" pre-release release forever, alongside the current
# HackDeepWiki-named ones. `gh` is preinstalled on GitHub-hosted
# runners and already has GITHUB_TOKEN available. `|| true` on each:
# the asset may not exist (e.g. a tagged release that never had it),
# and that shouldn't fail the whole release step.
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release delete-asset "${{ env.TAG_NAME }}" "FreeDeepWiki-windows-x64.exe" --repo "${{ github.repository }}" --yes || true
gh release delete-asset "${{ env.TAG_NAME }}" "FreeDeepWiki-x86_64.AppImage" --repo "${{ github.repository }}" --yes || true
- name: Create or update Github Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.TAG_NAME }}
name: ${{ env.RELEASE_NAME }}
prerelease: ${{ env.IS_PRERELEASE == 'true' }}
draft: false
body: |
Automatic pre-release builds of HackDeepWiki.
- Built from branch: `${{ github.ref_name }}`
- Commit: `${{ github.sha }}`
- Built at: ${{ github.event.head_commit.timestamp || 'N/A' }}
### Standalone Executables
- **Windows**: [HackDeepWiki-windows-x64.exe](https://github.com/${{ github.repository }}/releases/download/${{ env.TAG_NAME }}/HackDeepWiki-windows-x64.exe)
- **Linux (AppImage)**: [HackDeepWiki-x86_64.AppImage](https://github.com/${{ github.repository }}/releases/download/${{ env.TAG_NAME }}/HackDeepWiki-x86_64.AppImage)
*No installation is required. Simply download and run the binary for your platform.*
files: |
HackDeepWiki-windows-x64.exe
HackDeepWiki-x86_64.AppImage
make_latest: ${{ env.IS_PRERELEASE == 'false' }}