release: promote staging to prod — fuels 0.103.0 + bakosafe 0.6.2 #117
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: CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - staging | |
| paths: | |
| - 'packages/api/**' | |
| - 'packages/socket-server/**' | |
| - 'packages/worker/**' | |
| - '.github/workflows/ci.yml' | |
| pull_request: | |
| branches: | |
| - "**" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changelog: | |
| name: Changelog | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 2 | |
| if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check CHANGELOG.md was updated | |
| run: | | |
| if git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^CHANGELOG.md$"; then | |
| echo "✅ CHANGELOG.md was updated" | |
| else | |
| echo "❌ CHANGELOG.md was NOT updated" | |
| echo "" | |
| echo "Please update CHANGELOG.md with your changes." | |
| echo "Follow the Keep a Changelog format: https://keepachangelog.com/" | |
| exit 1 | |
| fi | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| defaults: | |
| run: | |
| working-directory: packages/api | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Run ESLint | |
| run: pnpm lint | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| defaults: | |
| run: | |
| working-directory: packages/api | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Run TypeScript check | |
| run: pnpm typecheck | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| if: github.actor != 'dependabot[bot]' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Run security audit | |
| run: pnpm audit --audit-level=high | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: packages/api | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-forc | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: packages/api/build | |
| retention-days: 1 | |
| docker-build: | |
| name: Docker Build (${{ matrix.package }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - package: api | |
| context: packages/api | |
| platform: linux/amd64 | |
| - package: socket-server | |
| context: packages/socket-server | |
| platform: linux/amd64 | |
| - package: worker | |
| context: packages/worker | |
| platform: linux/amd64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ${{ matrix.context }} | |
| platforms: ${{ matrix.platform }} | |
| push: false | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| needs: build | |
| defaults: | |
| run: | |
| working-directory: packages/api | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-forc | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build | |
| path: packages/api/build | |
| - name: Copy predicate releases | |
| run: pnpm copy:predicate-releases | |
| - name: Copy .env.test to .env | |
| run: cp .env.test .env | |
| - name: Run tests | |
| run: node --test-force-exit --test build/tests/*.tests.js | |
| env: | |
| TESTCONTAINERS_DB: "true" |