feat: shadcn migration, new templates (voice, meeting-notes), builder… #27
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: Desktop App Release | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "packages/desktop-app/**" | |
| - "packages/shared-app-config/**" | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to release (e.g. 0.2.0). Leave empty to use package.json version." | |
| required: false | |
| type: string | |
| permissions: | |
| contents: write | |
| env: | |
| # Deterministic version for auto-triggered builds: base version from | |
| # package.json + run number ensures uniqueness without committing back. | |
| AUTO_VERSION_SUFFIX: ${{ github.run_number }} | |
| jobs: | |
| resolve-version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.v.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Resolve version | |
| id: v | |
| shell: bash | |
| run: | | |
| if [ -n "${{ inputs.version }}" ]; then | |
| echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT" | |
| elif [ "${{ github.event_name }}" = "push" ]; then | |
| BASE=$(node -p "require('./packages/desktop-app/package.json').version") | |
| echo "version=${BASE}+${AUTO_VERSION_SUFFIX}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "version=$(node -p "require('./packages/desktop-app/package.json').version")" >> "$GITHUB_OUTPUT" | |
| fi | |
| build-mac: | |
| needs: resolve-version | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Set version | |
| working-directory: packages/desktop-app | |
| run: npm version "${{ needs.resolve-version.outputs.version }}" --no-git-tag-version --allow-same-version | |
| - name: Import signing certificate | |
| 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 "" build.keychain | |
| security default-keychain -s build.keychain | |
| security unlock-keychain -p "" 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 "" build.keychain | |
| rm certificate.p12 | |
| - name: Build and publish | |
| working-directory: packages/desktop-app | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
| APPLE_TEAM_ID: W3PMF2T3MW | |
| run: pnpm build && npx electron-builder --mac --config --publish always | |
| build-windows: | |
| needs: resolve-version | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Set version | |
| working-directory: packages/desktop-app | |
| run: npm version "${{ needs.resolve-version.outputs.version }}" --no-git-tag-version --allow-same-version | |
| - name: Build and publish | |
| working-directory: packages/desktop-app | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: pnpm build && npx electron-builder --win --config --publish always | |
| build-linux: | |
| needs: resolve-version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Set version | |
| working-directory: packages/desktop-app | |
| run: npm version "${{ needs.resolve-version.outputs.version }}" --no-git-tag-version --allow-same-version | |
| - name: Build and publish | |
| working-directory: packages/desktop-app | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: pnpm build && npx electron-builder --linux --config --publish always | |
| publish-release: | |
| needs: [resolve-version, build-mac, build-windows, build-linux] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Publish draft release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release edit "v${{ needs.resolve-version.outputs.version }}" --draft=false --latest -R ${{ github.repository }} |