chore: bump version to 0.0.2 #1
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-cli: | |
| name: Build CLI ${{ matrix.target }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: linux-x86_64 | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| name: linux-aarch64 | |
| - target: x86_64-apple-darwin | |
| os: macos-13 | |
| name: darwin-x86_64 | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| name: darwin-aarch64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross-compilation tools | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Prepare artifact | |
| run: | | |
| cp target/${{ matrix.target }}/release/embedded-postgres embedded-postgres-${{ matrix.name }} | |
| chmod +x embedded-postgres-${{ matrix.name }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cli-${{ matrix.name }} | |
| path: embedded-postgres-${{ matrix.name }} | |
| build-postgres-bundle: | |
| name: Bundle PostgreSQL ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-13 | |
| name: darwin-x86_64 | |
| pg_target: x86_64-apple-darwin | |
| - os: macos-latest | |
| name: darwin-aarch64 | |
| pg_target: aarch64-apple-darwin | |
| - os: ubuntu-latest | |
| name: linux-x86_64 | |
| pg_target: x86_64-unknown-linux-gnu | |
| - os: ubuntu-latest | |
| name: linux-aarch64 | |
| pg_target: aarch64-unknown-linux-gnu | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Load versions | |
| id: versions | |
| run: | | |
| source versions.env | |
| echo "PG_VERSION=$PG_VERSION" >> $GITHUB_OUTPUT | |
| echo "PGVECTOR_VERSION=$PGVECTOR_VERSION" >> $GITHUB_OUTPUT | |
| - name: Download PostgreSQL | |
| run: | | |
| mkdir -p bundle | |
| PG_URL="https://github.com/theseus-rs/postgresql-binaries/releases/download/${{ steps.versions.outputs.PG_VERSION }}/postgresql-${{ steps.versions.outputs.PG_VERSION }}-${{ matrix.pg_target }}.tar.gz" | |
| echo "Downloading PostgreSQL from $PG_URL" | |
| curl -fsSL "$PG_URL" -o postgresql.tar.gz | |
| tar -xzf postgresql.tar.gz -C bundle | |
| rm postgresql.tar.gz | |
| - name: Download pgvector | |
| run: | | |
| PG_VERSION="${{ steps.versions.outputs.PG_VERSION }}" | |
| PGVECTOR_VERSION="${{ steps.versions.outputs.PGVECTOR_VERSION }}" | |
| PG_MAJOR=$(echo "$PG_VERSION" | cut -d. -f1) | |
| PGVECTOR_URL="https://github.com/pgvector/pgvector/releases/download/v${PGVECTOR_VERSION}/pgvector-v${PGVECTOR_VERSION}-pg${PG_MAJOR}-${{ matrix.pg_target }}.tar.gz" | |
| echo "Downloading pgvector from $PGVECTOR_URL" | |
| if curl -fsSL "$PGVECTOR_URL" -o pgvector.tar.gz 2>/dev/null; then | |
| mkdir -p pgvector_extract | |
| tar -xzf pgvector.tar.gz -C pgvector_extract | |
| rm pgvector.tar.gz | |
| # Find PostgreSQL directory in bundle | |
| PG_DIR=$(find bundle -maxdepth 1 -type d | tail -1) | |
| # Copy pgvector files | |
| find pgvector_extract -name "*.so" -exec cp {} "$PG_DIR/lib/" \; 2>/dev/null || true | |
| find pgvector_extract -name "*.dylib" -exec cp {} "$PG_DIR/lib/" \; 2>/dev/null || true | |
| find pgvector_extract -name "vector.control" -exec cp {} "$PG_DIR/share/extension/" \; 2>/dev/null || true | |
| find pgvector_extract -name "vector--*.sql" -exec cp {} "$PG_DIR/share/extension/" \; 2>/dev/null || true | |
| rm -rf pgvector_extract | |
| echo "pgvector installed" | |
| else | |
| echo "Warning: pgvector not available for this platform" | |
| fi | |
| - name: Create bundle archive | |
| run: | | |
| PG_VERSION="${{ steps.versions.outputs.PG_VERSION }}" | |
| cd bundle | |
| tar -czf ../postgresql-${PG_VERSION}-${{ matrix.pg_target }}.tar.gz . | |
| cd .. | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: postgresql-${{ matrix.name }} | |
| path: postgresql-${{ steps.versions.outputs.PG_VERSION }}-${{ matrix.pg_target }}.tar.gz | |
| release: | |
| needs: [build-cli, build-postgres-bundle] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Load versions | |
| id: versions | |
| run: | | |
| source versions.env | |
| echo "PG_VERSION=$PG_VERSION" >> $GITHUB_OUTPUT | |
| echo "PGVECTOR_VERSION=$PGVECTOR_VERSION" >> $GITHUB_OUTPUT | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release files | |
| run: | | |
| mkdir release | |
| find artifacts -type f -exec mv {} release/ \; | |
| ls -la release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: release/* | |
| generate_release_notes: true | |
| body: | | |
| ## Embedded PostgreSQL CLI | |
| ### CLI Binaries | |
| Download the CLI for your platform: | |
| - `embedded-postgres-darwin-aarch64` - macOS Apple Silicon | |
| - `embedded-postgres-darwin-x86_64` - macOS Intel | |
| - `embedded-postgres-linux-x86_64` - Linux x86_64 | |
| - `embedded-postgres-linux-aarch64` - Linux ARM64 | |
| ### PostgreSQL Bundles (with pgvector) | |
| These are automatically downloaded by the CLI on first run: | |
| - PostgreSQL ${{ steps.versions.outputs.PG_VERSION }} with pgvector ${{ steps.versions.outputs.PGVECTOR_VERSION }} | |
| ### Installation | |
| ```bash | |
| curl -fsSL https://raw.githubusercontent.com/vectorize-io/embedded-pg-cli/main/install.sh | bash | |
| ``` |