chore: bump version to 0.5.7 #23
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 | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTC_WRAPPER: "" | |
| jobs: | |
| build-cli: | |
| name: Build CLI (${{ matrix.target }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| archive: tar.gz | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| archive: tar.gz | |
| cross: true | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| archive: tar.gz | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| archive: zip | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Install cross | |
| if: matrix.cross | |
| uses: taiki-e/install-action@cross | |
| - name: Build | |
| env: | |
| RUSTC_WRAPPER: "" | |
| CROSS_CONTAINER_OPTS: "--env RUSTC_WRAPPER=" | |
| run: ${{ matrix.cross && 'cross' || 'cargo' }} build --release --target ${{ matrix.target }} -p reasondb-cli ${{ matrix.cross && '--features vendored-openssl' || '' }} | |
| - name: Package (unix) | |
| if: matrix.archive == 'tar.gz' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar czf ../../../reasondb-${{ github.ref_name }}-${{ matrix.target }}.tar.gz reasondb | |
| cd ../../.. | |
| - name: Package (windows) | |
| if: matrix.archive == 'zip' | |
| shell: pwsh | |
| run: | | |
| Compress-Archive -Path target/${{ matrix.target }}/release/reasondb.exe -DestinationPath reasondb-${{ github.ref_name }}-${{ matrix.target }}.zip | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: reasondb-${{ matrix.target }} | |
| path: reasondb-${{ github.ref_name }}-${{ matrix.target }}.* | |
| release: | |
| name: Create Release | |
| needs: build-cli | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Generate checksums | |
| run: | | |
| cd artifacts | |
| sha256sum reasondb-* > checksums-sha256.txt | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: | | |
| artifacts/reasondb-* | |
| artifacts/checksums-sha256.txt | |
| build-desktop: | |
| name: Build Desktop (${{ matrix.platform }}) | |
| needs: release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest | |
| args: --target universal-apple-darwin | |
| rust-targets: aarch64-apple-darwin,x86_64-apple-darwin | |
| - platform: windows-latest | |
| args: '' | |
| rust-targets: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: apps/reasondb-client/package-lock.json | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.rust-targets }} | |
| - name: Rust cache | |
| uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: apps/reasondb-client/src-tauri -> target | |
| - name: Ensure Rust targets are installed | |
| if: matrix.rust-targets != '' | |
| run: | | |
| for target in $(echo "${{ matrix.rust-targets }}" | tr ',' ' '); do | |
| rustup target add $target | |
| done | |
| - name: Build @reasondb/rql-editor workspace package | |
| shell: bash | |
| run: | | |
| cp -r "$GITHUB_WORKSPACE/packages/rql-editor" "$RUNNER_TEMP/rql-editor" | |
| cd "$RUNNER_TEMP/rql-editor" | |
| npm install --ignore-scripts | |
| npm run build | |
| cp -r "$RUNNER_TEMP/rql-editor/dist" "$GITHUB_WORKSPACE/packages/rql-editor/dist" | |
| - name: Install frontend dependencies | |
| shell: bash | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/apps/reasondb-client" "$RUNNER_TEMP/packages" | |
| cp "$GITHUB_WORKSPACE/apps/reasondb-client/package.json" "$RUNNER_TEMP/apps/reasondb-client/" | |
| cp "$GITHUB_WORKSPACE/apps/reasondb-client/package-lock.json" "$RUNNER_TEMP/apps/reasondb-client/" | |
| cp -r "$GITHUB_WORKSPACE/packages/rql-editor/." "$RUNNER_TEMP/packages/rql-editor/" | |
| cd "$RUNNER_TEMP/apps/reasondb-client" | |
| npm ci | |
| rm -rf node_modules/@reasondb/rql-editor | |
| cp -r "$RUNNER_TEMP/packages/rql-editor/." node_modules/@reasondb/rql-editor/ | |
| mv node_modules "$GITHUB_WORKSPACE/apps/reasondb-client/node_modules" | |
| - name: Build and release (Tauri) | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RUSTC_WRAPPER: '' | |
| NODE_OPTIONS: --max-old-space-size=4096 | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| with: | |
| projectPath: apps/reasondb-client | |
| tagName: ${{ github.ref_name }} | |
| releaseName: ReasonDB ${{ github.ref_name }} | |
| releaseBody: | | |
| See the assets below to download and install ReasonDB ${{ github.ref_name }}. | |
| **macOS:** Download the `.dmg` file and drag ReasonDB into your Applications folder. | |
| **Windows:** Download the `.msi` or `.exe` installer and run it. | |
| releaseDraft: false | |
| prerelease: false | |
| args: ${{ matrix.args }} | |
| update-homebrew: | |
| name: Update Homebrew Tap | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Clone tap repo | |
| env: | |
| TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }} | |
| run: | | |
| git clone "https://x-access-token:${TAP_TOKEN}@github.com/brainfish-ai/homebrew-reasondb-tap.git" tap | |
| - name: Generate formula | |
| run: | | |
| cd tap | |
| bash "${{ github.workspace }}/scripts/update-homebrew.sh" "${{ github.ref_name }}" "${{ github.workspace }}/artifacts" | |
| - name: Push to tap | |
| run: | | |
| cd tap | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Formula/reasondb.rb | |
| git commit -m "reasondb ${{ github.ref_name }}" | |
| git push |