Release v0.3.0 #4
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 | |
| id-token: write | |
| jobs: | |
| verify: | |
| name: Verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Install web dependencies | |
| run: cd web && bun install | |
| - name: Lint & typecheck | |
| run: | | |
| bun run format:check | |
| bun run lint | |
| bun run check | |
| - name: Unit tests | |
| run: bun run test:unit | |
| - name: Web tests | |
| run: bun run test:web | |
| - name: Integration tests | |
| run: bun run test:integration | |
| build-and-push: | |
| name: Build & Push to ECR | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: ${{ vars.AWS_ROLE_ARN }} | |
| aws-region: us-east-1 | |
| - uses: aws-actions/amazon-ecr-login@v2 | |
| id: ecr | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Set image tags | |
| id: tags | |
| run: | | |
| VERSION=${GITHUB_REF_NAME} | |
| SHA=$(git rev-parse --short HEAD) | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "sha=$SHA" >> "$GITHUB_OUTPUT" | |
| - name: Build and push platform image | |
| run: | | |
| docker build --platform linux/amd64 \ | |
| --build-arg BUILD_SHA=${{ steps.tags.outputs.sha }} \ | |
| -t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform:${{ steps.tags.outputs.version }} \ | |
| -t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform:${{ steps.tags.outputs.sha }} \ | |
| -t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform:latest \ | |
| -f Dockerfile . | |
| docker push --all-tags ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-platform | |
| - name: Build and push web image | |
| run: | | |
| docker build --platform linux/amd64 \ | |
| -t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web:${{ steps.tags.outputs.version }} \ | |
| -t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web:${{ steps.tags.outputs.sha }} \ | |
| -t ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web:latest \ | |
| -f web/Dockerfile web/ | |
| docker push --all-tags ${{ steps.ecr.outputs.registry }}/nimblebrain/agent-web | |
| github-release: | |
| name: GitHub Release | |
| needs: build-and-push | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| generate_release_notes: true |