chore: Bump version to 1.4.0 #41
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| name: windows | |
| ext: .exe | |
| - os: ubuntu-latest | |
| name: linux | |
| ext: "" | |
| - os: macos-latest | |
| name: macos-arm64 | |
| ext: "" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify MCP files exist | |
| shell: bash | |
| run: | | |
| echo "Checking for required MCP integration files..." | |
| if [ ! -f "mcp.json" ]; then | |
| echo "ERROR: mcp.json manifest is missing!" | |
| exit 1 | |
| fi | |
| echo "✅ mcp.json found" | |
| if [ ! -f "llms.txt" ]; then | |
| echo "WARNING: llms.txt is missing (recommended for AI discoverability)" | |
| else | |
| echo "✅ llms.txt found" | |
| fi | |
| if [ ! -f "context7.json" ]; then | |
| echo "WARNING: context7.json is missing (recommended for Context7 integration)" | |
| else | |
| echo "✅ context7.json found" | |
| fi | |
| if [ ! -f "pyproject.toml" ]; then | |
| echo "WARNING: pyproject.toml is missing (required for PyPI publishing)" | |
| else | |
| echo "✅ pyproject.toml found" | |
| fi | |
| if [ ! -f "package.json" ]; then | |
| echo "WARNING: package.json is missing (required for npm publishing)" | |
| else | |
| echo "✅ package.json found" | |
| fi | |
| echo "MCP file verification complete!" | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyinstaller | |
| # Install core requirements | |
| if [ -f requirements.txt ]; then | |
| pip install -r requirements.txt | |
| fi | |
| # Install additional AI SDK dependencies (may fail gracefully on some platforms) | |
| pip install google-genai>=1.0.0 || echo "google-genai installation skipped" | |
| pip install azure-ai-inference>=1.0.0b1 azure-core>=1.30.0 || echo "azure-ai-inference installation skipped" | |
| pip install tenacity>=8.2.0 || echo "tenacity installation skipped" | |
| pip install aiohttp>=3.9.0 || echo "aiohttp installation skipped" | |
| - name: Generate version file from tag | |
| shell: bash | |
| run: | | |
| # Extract clean version from git tag (strip 'v' prefix) | |
| VERSION="${{ github.ref_name }}" | |
| VERSION="${VERSION#v}" | |
| echo "Generating version file for: ${VERSION}" | |
| # Create properly formatted _version.py | |
| mkdir -p pomera | |
| cat > pomera/_version.py << EOF | |
| # AUTO-GENERATED by setuptools_scm - DO NOT EDIT | |
| __version__ = "${VERSION}" | |
| EOF | |
| # Verify the generated file | |
| echo "Generated pomera/_version.py:" | |
| cat pomera/_version.py | |
| # Test that it's valid Python | |
| python -c "from pomera._version import __version__; print(f'Version verified: {__version__}')" | |
| - name: Build executable | |
| shell: bash | |
| run: | | |
| # Copy and modify the spec file for this build | |
| cp pomera.spec pomera-${{ matrix.name }}.spec | |
| # Update the executable name in the spec file | |
| python update_spec.py pomera-${{ matrix.name }}.spec pomera-${{ github.ref_name }}-${{ matrix.name }} | |
| # Build using the spec file | |
| python -m PyInstaller pomera-${{ matrix.name }}.spec | |
| # List contents for debugging | |
| echo "Contents of dist directory after build:" | |
| if command -v ls >/dev/null 2>&1; then | |
| ls -la dist/ | |
| else | |
| dir dist | |
| fi | |
| - name: Rename and prepare artifact | |
| shell: bash | |
| run: | | |
| echo "Contents of dist directory:" | |
| if command -v ls >/dev/null 2>&1; then | |
| ls -la dist/ | |
| else | |
| dir dist | |
| fi | |
| cd dist | |
| # The spec file should create the executable with the correct name already | |
| EXPECTED_NAME="pomera-${{ github.ref_name }}-${{ matrix.name }}" | |
| if [ "${{ matrix.name }}" = "windows" ]; then | |
| EXPECTED_FILE="${EXPECTED_NAME}.exe" | |
| FINAL_FILE="${EXPECTED_NAME}${{ matrix.ext }}" | |
| if [ -f "${EXPECTED_FILE}" ]; then | |
| if [ "${EXPECTED_FILE}" != "${FINAL_FILE}" ]; then | |
| mv "${EXPECTED_FILE}" "${FINAL_FILE}" | |
| fi | |
| else | |
| echo "Error: Expected Windows executable ${EXPECTED_FILE} not found" | |
| echo "Available files:" | |
| if command -v ls >/dev/null 2>&1; then | |
| ls -la | |
| else | |
| dir | |
| fi | |
| exit 1 | |
| fi | |
| else | |
| EXPECTED_FILE="${EXPECTED_NAME}" | |
| FINAL_FILE="${EXPECTED_NAME}${{ matrix.ext }}" | |
| if [ -f "${EXPECTED_FILE}" ]; then | |
| chmod +x "${EXPECTED_FILE}" | |
| if [ "${EXPECTED_FILE}" != "${FINAL_FILE}" ]; then | |
| mv "${EXPECTED_FILE}" "${FINAL_FILE}" | |
| fi | |
| else | |
| echo "Error: Expected Unix executable ${EXPECTED_FILE} not found" | |
| echo "Available files:" | |
| ls -la | |
| exit 1 | |
| fi | |
| fi | |
| echo "Final artifact:" | |
| if command -v ls >/dev/null 2>&1; then | |
| ls -la "${FINAL_FILE}" | |
| else | |
| dir "${FINAL_FILE}" | |
| fi | |
| - name: Create macOS DMG | |
| if: startsWith(matrix.os, 'macos') | |
| shell: bash | |
| run: | | |
| cd dist | |
| APP_NAME="pomera-${{ github.ref_name }}-${{ matrix.name }}" | |
| DMG_NAME="${APP_NAME}.dmg" | |
| # Create a temporary directory for DMG contents | |
| mkdir -p dmg-temp | |
| cp "${APP_NAME}" dmg-temp/ | |
| # Create the DMG | |
| hdiutil create -volname "Pomera ${{ github.ref_name }}" -srcfolder dmg-temp -ov -format UDZO "${DMG_NAME}" | |
| echo "Created DMG:" | |
| ls -la "${DMG_NAME}" | |
| - name: Create Linux DEB package | |
| if: matrix.name == 'linux' | |
| shell: bash | |
| run: | | |
| cd dist | |
| APP_NAME="pomera-${{ github.ref_name }}-${{ matrix.name }}" | |
| DEB_NAME="pomera-${{ github.ref_name }}-linux.deb" | |
| # Create DEB package structure | |
| mkdir -p deb-temp/DEBIAN | |
| mkdir -p deb-temp/usr/local/bin | |
| mkdir -p deb-temp/usr/share/applications | |
| mkdir -p deb-temp/usr/share/doc/pomera | |
| # Copy executable | |
| cp "${APP_NAME}" deb-temp/usr/local/bin/pomera | |
| chmod +x deb-temp/usr/local/bin/pomera | |
| # Strip 'v' prefix from version for DEB package | |
| VERSION="${{ github.ref_name }}" | |
| VERSION="${VERSION#v}" | |
| # Create control file | |
| cat > deb-temp/DEBIAN/control << EOF | |
| Package: pomera | |
| Version: ${VERSION} | |
| Section: utils | |
| Priority: optional | |
| Architecture: amd64 | |
| Maintainer: Pomera Team | |
| Description: Pomera text editor | |
| A powerful text editor application. | |
| EOF | |
| # Create desktop entry | |
| cat > deb-temp/usr/share/applications/pomera.desktop << EOF | |
| [Desktop Entry] | |
| Name=Pomera | |
| Comment=Text Editor | |
| Exec=/usr/local/bin/pomera | |
| Icon=text-editor | |
| Terminal=false | |
| Type=Application | |
| Categories=Utility;TextEditor; | |
| EOF | |
| # Create copyright file | |
| cat > deb-temp/usr/share/doc/pomera/copyright << EOF | |
| Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | |
| Upstream-Name: pomera | |
| Source: https://github.com/${{ github.repository }} | |
| Files: * | |
| Copyright: $(date +%Y) Pomera Team | |
| License: MIT | |
| EOF | |
| # Build the DEB package | |
| dpkg-deb --build deb-temp "${DEB_NAME}" | |
| echo "Created DEB package:" | |
| ls -la "${DEB_NAME}" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pomera-${{ github.ref_name }}-${{ matrix.name }}${{ matrix.ext }} | |
| path: | | |
| dist/pomera-${{ github.ref_name }}-${{ matrix.name }}${{ matrix.ext }} | |
| dist/pomera-${{ github.ref_name }}-${{ matrix.name }}.dmg | |
| dist/pomera-${{ github.ref_name }}-linux.deb | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| artifacts/pomera-${{ github.ref_name }}-windows.exe/pomera-${{ github.ref_name }}-windows.exe | |
| artifacts/pomera-${{ github.ref_name }}-linux/pomera-${{ github.ref_name }}-linux | |
| artifacts/pomera-${{ github.ref_name }}-linux/pomera-${{ github.ref_name }}-linux.deb | |
| artifacts/pomera-${{ github.ref_name }}-macos-arm64/pomera-${{ github.ref_name }}-macos-arm64 | |
| artifacts/pomera-${{ github.ref_name }}-macos-arm64/pomera-${{ github.ref_name }}-macos-arm64.dmg | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |