chore: agentic data studio issue fix before release #48
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: | |
| branches: [master] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-version: | |
| name: Check Version Bump | |
| runs-on: ubuntu-latest | |
| outputs: | |
| is_new_version: ${{ steps.check.outputs.is_new_version }} | |
| version: ${{ steps.check.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if version is new | |
| id: check | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| if git tag --list | grep -q "^v${VERSION}$"; then | |
| echo "Tag v${VERSION} already exists, skipping release" | |
| echo "is_new_version=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "Tag v${VERSION} not found, proceeding with release" | |
| echo "is_new_version=true" >> $GITHUB_OUTPUT | |
| fi | |
| build: | |
| name: ${{ matrix.name }} | |
| needs: check-version | |
| if: needs.check-version.outputs.is_new_version == 'true' | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: macOS | |
| platform: macos-latest | |
| args: --target universal-apple-darwin | |
| target: aarch64-apple-darwin,x86_64-apple-darwin | |
| - name: Windows | |
| platform: windows-latest | |
| args: '' | |
| target: '' | |
| - name: Linux | |
| platform: ubuntu-latest | |
| args: '' | |
| target: '' | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: lts/* | |
| cache: npm | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libssl-dev | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint check | |
| run: npm run lint:check | |
| - name: Run tests | |
| run: npm run test:ci | |
| - name: Build frontend | |
| run: npm run build | |
| - name: Import Apple Developer Certificate | |
| if: runner.os == 'macOS' | |
| env: | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| run: | | |
| echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12 | |
| security create-keychain -p "SqlKit2024!" build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p "SqlKit2024!" build.keychain | |
| security set-keychain-settings -t 3600 -u build.keychain | |
| security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign | |
| security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "SqlKit2024!" build.keychain | |
| - name: Extract Signing Identity | |
| if: runner.os == 'macOS' | |
| run: | | |
| CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Apple Development" || security find-identity -v -p codesigning build.keychain | grep "Developer ID") | |
| CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}') | |
| echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV | |
| echo "Signing identity: $CERT_ID" | |
| - name: Build and Release | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | |
| APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} | |
| TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} | |
| with: | |
| tagName: v__VERSION__ | |
| releaseName: SqlKit v__VERSION__ | |
| releaseBody: See the assets to download this version and install. | |
| releaseDraft: true | |
| prerelease: false | |
| args: ${{ matrix.args }} | |
| includeUpdaterJson: true | |
| publish: | |
| name: Publish Release | |
| needs: [check-version, build] | |
| if: needs.check-version.outputs.is_new_version == 'true' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Publish draft release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release edit "v${{ needs.check-version.outputs.version }}" --draft=false --repo ${{ github.repository }} |