chore: bump version to 5.8.1 #900
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: Publish to npm | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| check: | |
| name: Lint & Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run lint | |
| run: mise run lint | |
| - name: Run typecheck | |
| run: mise run typecheck | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run tests | |
| run: mise run test | |
| publish: | |
| needs: [check, test] | |
| runs-on: ubuntu-latest | |
| environment: npm-publish | |
| permissions: | |
| contents: write | |
| id-token: write # Required for OIDC | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| tag: ${{ steps.version.outputs.tag }} | |
| should_release: ${{ steps.check_release.outputs.should_release }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version from package.json | |
| id: version | |
| run: | | |
| VERSION=$(jq -r '.version' package.json) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "tag=v$VERSION" >> $GITHUB_OUTPUT | |
| - name: Check release status | |
| id: check_release | |
| run: | | |
| TAG="v${{ steps.version.outputs.version }}" | |
| VERSION="${{ steps.version.outputs.version }}" | |
| # Check if tag exists | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| TAG_EXISTS="true" | |
| else | |
| TAG_EXISTS="false" | |
| fi | |
| # Check if npm version exists | |
| if npm view @knowsuchagency/fulcrum@$VERSION version >/dev/null 2>&1; then | |
| NPM_EXISTS="true" | |
| else | |
| NPM_EXISTS="false" | |
| fi | |
| # If tag exists but npm doesn't, we have an incomplete release - delete orphan tag | |
| if [ "$TAG_EXISTS" = "true" ] && [ "$NPM_EXISTS" = "false" ]; then | |
| echo "Found orphan tag without npm release, deleting tag..." | |
| git push origin :refs/tags/$TAG || true | |
| TAG_EXISTS="false" | |
| fi | |
| # Release if tag doesn't exist yet (idempotent — won't re-release) | |
| SHOULD_RELEASE=$( [ "$TAG_EXISTS" = "false" ] && echo 'true' || echo 'false' ) | |
| echo "tag_exists=$TAG_EXISTS, npm_exists=$NPM_EXISTS, should_release=$SHOULD_RELEASE" | |
| echo "should_release=$SHOULD_RELEASE" >> $GITHUB_OUTPUT | |
| - name: Setup Bun | |
| if: steps.check_release.outputs.should_release == 'true' | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup Node.js | |
| if: steps.check_release.outputs.should_release == 'true' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Setup mise | |
| if: steps.check_release.outputs.should_release == 'true' | |
| uses: jdx/mise-action@v2 | |
| - name: Install dependencies | |
| if: steps.check_release.outputs.should_release == 'true' | |
| run: bun install | |
| - name: Verify version sync | |
| if: steps.check_release.outputs.should_release == 'true' | |
| run: mise run check:version | |
| - name: Build CLI | |
| if: steps.check_release.outputs.should_release == 'true' | |
| run: mise run cli:build | |
| - name: Publish to npm | |
| if: steps.check_release.outputs.should_release == 'true' | |
| working-directory: cli | |
| run: npm publish --access public --provenance | |
| - name: Create and push tag | |
| if: steps.check_release.outputs.should_release == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag ${{ steps.version.outputs.tag }} | |
| git push origin ${{ steps.version.outputs.tag }} | |
| - name: Create GitHub Release | |
| if: steps.check_release.outputs.should_release == 'true' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.version.outputs.tag }} | |
| name: ${{ steps.version.outputs.tag }} | |
| draft: false | |
| generate_release_notes: true | |
| body: | | |
| ## Installation | |
| ### Desktop App (Recommended) | |
| Download the appropriate package for your platform: | |
| - **macOS (Apple Silicon)**: `Fulcrum-macos-arm64.dmg` | |
| - **Linux (x64)**: `Fulcrum-linux-x64.AppImage` | |
| ### CLI | |
| ```bash | |
| npx @knowsuchagency/fulcrum@latest up | |
| ``` | |
| # Desktop builds - run in parallel on multiple platforms | |
| build-desktop: | |
| needs: publish | |
| if: needs.publish.outputs.should_release == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # macOS Apple Silicon | |
| - os: macos-latest | |
| platform: macos | |
| arch: arm64 | |
| artifact: Fulcrum-macos-arm64.dmg | |
| # Linux x64 | |
| - os: ubuntu-latest | |
| platform: linux | |
| arch: x64 | |
| artifact: Fulcrum-linux-x64.AppImage | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Setup mise | |
| uses: jdx/mise-action@v2 | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Install create-dmg (macOS) | |
| if: matrix.platform == 'macos' | |
| run: brew install create-dmg | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libfuse2 | |
| - name: Build Neutralino app | |
| run: mise run desktop:build | |
| - name: Bundle server | |
| run: mise run desktop:bundle | |
| - name: Package DMG (macOS) | |
| if: matrix.platform == 'macos' | |
| run: ./desktop/scripts/package-dmg.sh ${{ matrix.arch }} | |
| - name: Package AppImage (Linux) | |
| if: matrix.platform == 'linux' | |
| run: ./desktop/scripts/package-appimage.sh ${{ matrix.arch }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: desktop-${{ matrix.platform }}-${{ matrix.arch }} | |
| path: desktop/dist/${{ matrix.artifact }} | |
| # Finalize release with all desktop builds | |
| finalize-release: | |
| needs: [publish, build-desktop] | |
| if: needs.publish.outputs.should_release == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all desktop artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| pattern: desktop-* | |
| - name: Flatten artifacts | |
| run: | | |
| mkdir -p release-assets | |
| find artifacts -type f \( -name "*.dmg" -o -name "*.AppImage" \) -exec cp {} release-assets/ \; | |
| ls -la release-assets/ | |
| - name: Upload assets to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.publish.outputs.tag }} | |
| draft: false | |
| files: release-assets/* |