Skip to content

feat: capabilities

feat: capabilities #46

Workflow file for this run

name: Build, Deploy Contracts & Publish to Vercel
on:
push:
branches:
- main
pull_request:
branches:
- main
- next
workflow_dispatch:
env:
PASSWORD: ${{ secrets.PASSWORD }}
permissions:
contents: read
pull-requests: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Install Aztec CLI
run: |
VERSION=$(jq -r '.dependencies["@aztec/aztec.js"]' package.json)
VERSION_NO_V=${VERSION#v}
echo "Installing Aztec version: $VERSION_NO_V"
curl -s https://install.aztec.network/$VERSION_NO_V/ -o tmp.sh
echo "Downloaded script, first 5 lines:"
head -5 tmp.sh
bash tmp.sh
echo "Install script completed"
ls -la ~/.aztec/bin/ || echo "~/.aztec/bin does not exist"
- name: Update path
run: echo "/home/runner/.aztec/bin" >> $GITHUB_PATH
- name: Compile contracts
run: yarn compile:contracts
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy to Vercel
id: deploy
run: |
if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref }}" == "refs/heads/main" ]; then
DEPLOY_URL=$(vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }} --archive=tgz --yes)
else
DEPLOY_URL=$(vercel deploy --token=${{ secrets.VERCEL_TOKEN }} --archive=tgz --yes)
fi
echo "url=$DEPLOY_URL" >> $GITHUB_OUTPUT
- name: Comment deployment URL on PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🚀 Deployed to Vercel!\n\n**Preview URL:** ${{ steps.deploy.outputs.url }}'
})