feat: add exe.dev quota checker (#516) #516
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: Dev Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'packages/**/*.ts' | |
| - 'packages/**/*.tsx' | |
| - 'packages/**/*.lock' | |
| - 'packages/**/*.json' | |
| - '*.yaml' | |
| - '*.yml' | |
| # Schema changes are handled by generate-migrations.yml, which triggers | |
| # this workflow via workflow_dispatch after migrations are committed. | |
| - '!packages/backend/drizzle/schema/**' | |
| workflow_dispatch: | |
| inputs: | |
| sha: | |
| description: 'Commit SHA to build (used when triggered after migration generation)' | |
| required: false | |
| type: string | |
| jobs: | |
| dev-release: | |
| name: Dev Release | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Determine commit SHA | |
| id: sha | |
| run: | | |
| if [ -n "${{ inputs.sha }}" ]; then | |
| echo "sha=${{ inputs.sha }}" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "sha=${{ github.sha }}" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ steps.sha.outputs.sha }} | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install Base dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: . | |
| - name: Install Backend dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: ./packages/backend | |
| - name: Install Frontend dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: ./packages/frontend | |
| - name: Build frontend | |
| run: bun run build:frontend | |
| - name: Compile Binaries | |
| # compiling each platform separately | |
| # Frontend is built above; compile:* scripts skip the rebuild in CI via build:frontend:if-needed. | |
| env: | |
| APP_VERSION: dev-${{ steps.sha.outputs.sha }} | |
| run: | | |
| bun run compile:linux-amd64 | |
| bun run compile:linux-arm64 | |
| bun run compile:macos | |
| bun run compile:windows | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ghcr.io/${{ github.repository }} | |
| tags: | | |
| type=raw,value=dev | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| push: true | |
| tags: ghcr.io/${{ github.repository }}:dev | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| APP_VERSION=dev-${{ steps.sha.outputs.sha }} | |
| - name: Create dev pre-release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: | | |
| plexus-linux-amd64 | |
| plexus-linux-arm64 | |
| plexus-macos | |
| plexus.exe | |
| draft: false | |
| prerelease: true | |
| tag_name: dev-${{ steps.sha.outputs.sha }} | |
| body: | | |
| Development pre-release from commit ${{ steps.sha.outputs.sha }} | |
| Built from: `main` at `${{ steps.sha.outputs.sha }}` |