fix: pino logger crash + tsconfig path mappings for @vornrun (#174) #70
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*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Determine tag | |
| id: tag | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| tag="${GITHUB_REF_NAME}" | |
| else | |
| tag="v$(jq -r .version package.json)" | |
| fi | |
| echo "tag=$tag" >> "$GITHUB_OUTPUT" | |
| - name: Create release if not exists | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| tag="${{ steps.tag.outputs.tag }}" | |
| is_prerelease=false | |
| if [[ "$tag" == *"-beta"* ]] || [[ "$tag" == *"-alpha"* ]] || [[ "$tag" == *"-rc"* ]]; then | |
| is_prerelease=true | |
| fi | |
| # Check if release already exists | |
| if gh release view "$tag" &>/dev/null; then | |
| echo "Release $tag already exists, skipping creation" | |
| else | |
| echo "Creating release $tag (prerelease=$is_prerelease)" | |
| flags="--draft --title $tag --generate-notes" | |
| if [ "$is_prerelease" = true ]; then | |
| flags="$flags --prerelease" | |
| fi | |
| gh release create "$tag" $flags | |
| fi | |
| build-macos: | |
| needs: create-release | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Python setuptools | |
| run: pip install setuptools | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Import code signing certificate | |
| env: | |
| MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} | |
| MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} | |
| run: | | |
| echo "$MAC_CERTIFICATE" | base64 --decode > certificate.p12 | |
| security create-keychain -p actions build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p actions build.keychain | |
| security import certificate.p12 -k build.keychain -P "$MAC_CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k actions build.keychain | |
| rm certificate.p12 | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| run: | | |
| yarn build | |
| yarn dist --publish never | |
| - name: Upload to release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| tag="${GITHUB_REF_NAME}" | |
| else | |
| tag="v$(node -p 'require("./package.json").version')" | |
| fi | |
| # Determine if this is a beta release | |
| is_beta=false | |
| if [[ "$tag" == *"-beta"* ]] || [[ "$tag" == *"-alpha"* ]] || [[ "$tag" == *"-rc"* ]]; then | |
| is_beta=true | |
| fi | |
| # Upload platform artifacts | |
| for f in dist/*.dmg dist/*.dmg.blockmap dist/*.zip dist/*.zip.blockmap; do | |
| [ -f "$f" ] && gh release upload "$tag" "$f" --clobber | |
| done | |
| # Upload update metadata file | |
| # For beta: rename latest-mac.yml → beta-mac.yml so electron-updater finds it | |
| if [ "$is_beta" = true ] && [ -f dist/latest-mac.yml ]; then | |
| cp dist/latest-mac.yml dist/beta-mac.yml | |
| gh release upload "$tag" dist/beta-mac.yml --clobber | |
| fi | |
| [ -f dist/latest-mac.yml ] && gh release upload "$tag" dist/latest-mac.yml --clobber | |
| - name: Clean up keychain | |
| if: always() | |
| run: security delete-keychain build.keychain || true | |
| build-windows: | |
| needs: create-release | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Python setuptools | |
| run: pip install setuptools | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build | |
| run: | | |
| yarn build | |
| yarn dist --publish never | |
| - name: Upload to release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if ($env:GITHUB_REF -match '^refs/tags/') { | |
| $tag = $env:GITHUB_REF_NAME | |
| } else { | |
| $tag = "v" + (node -p "require('./package.json').version") | |
| } | |
| $is_beta = $tag -match '-(beta|alpha|rc)' | |
| Get-ChildItem dist\*.exe, dist\*.blockmap | ForEach-Object { | |
| gh release upload $tag $_.FullName --clobber | |
| } | |
| # Upload update metadata | |
| if ($is_beta -and (Test-Path dist\latest.yml)) { | |
| Copy-Item dist\latest.yml dist\beta.yml | |
| gh release upload $tag dist\beta.yml --clobber | |
| } | |
| if (Test-Path dist\latest.yml) { | |
| gh release upload $tag dist\latest.yml --clobber | |
| } | |
| build-linux: | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Python setuptools | |
| run: pip install setuptools | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build | |
| run: | | |
| yarn build | |
| yarn dist --publish never | |
| - name: Upload to release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/* ]]; then | |
| tag="${GITHUB_REF_NAME}" | |
| else | |
| tag="v$(node -p 'require("./package.json").version')" | |
| fi | |
| is_beta=false | |
| if [[ "$tag" == *"-beta"* ]] || [[ "$tag" == *"-alpha"* ]] || [[ "$tag" == *"-rc"* ]]; then | |
| is_beta=true | |
| fi | |
| for f in dist/*.AppImage dist/*.deb dist/*.rpm; do | |
| [ -f "$f" ] && gh release upload "$tag" "$f" --clobber | |
| done | |
| if [ "$is_beta" = true ] && [ -f dist/latest-linux.yml ]; then | |
| cp dist/latest-linux.yml dist/beta-linux.yml | |
| gh release upload "$tag" dist/beta-linux.yml --clobber | |
| fi | |
| [ -f dist/latest-linux.yml ] && gh release upload "$tag" dist/latest-linux.yml --clobber | |
| publish-mcp: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Python setuptools | |
| run: pip install setuptools | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Sync MCP version from tag | |
| run: | | |
| VERSION="${GITHUB_REF_NAME#v}" | |
| cd packages/mcp && npm pkg set version="$VERSION" | |
| - name: Build MCP package | |
| run: yarn workspace @vornrun/mcp build | |
| - name: Publish to npm | |
| working-directory: packages/mcp | |
| run: | | |
| VERSION=$(node -p 'require("./package.json").version') | |
| TAG="${GITHUB_REF_NAME}" | |
| # Determine npm dist-tag: beta releases get "beta" tag, stable get "latest" | |
| NPM_TAG="latest" | |
| if [[ "$TAG" == *"-beta"* ]] || [[ "$TAG" == *"-alpha"* ]] || [[ "$TAG" == *"-rc"* ]]; then | |
| NPM_TAG="beta" | |
| fi | |
| PUBLISHED=$(npm view @vornrun/mcp version 2>/dev/null || echo "none") | |
| if [ "$VERSION" = "$PUBLISHED" ]; then | |
| echo "Version $VERSION already published, skipping" | |
| else | |
| yarn npm publish --access public --tag "$NPM_TAG" | |
| echo "Published @vornrun/mcp@$VERSION with dist-tag '$NPM_TAG'" | |
| fi | |
| env: | |
| YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |