Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 23 additions & 85 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,105 +2,43 @@ name: Canary Release

on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
export:
name: Generate Canary Release
# ══════════════════════════════════════════════════════════════════════════════
# CANARY RELEASE JOB
# ══════════════════════════════════════════════════════════════════════════════
canary:
name: Canary Release
environment: Development
runs-on: ubuntu-latest
runs-on: ubuntu-latest-m
timeout-minutes: 60

env:
PROJECT_NAME: '@defi-wonderland/aztec-standards'

steps:
- name: Checkout Repo
- name: Checkout
uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "22.17.0"
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Set up Docker
uses: docker/setup-buildx-action@v2

- name: Detect Aztec version
id: aztec-version
run: |
AZTEC_VERSION=$(node -p "require('./package.json').config.aztecVersion")
echo "version=$AZTEC_VERSION" >> "$GITHUB_OUTPUT"
echo "Aztec version is $AZTEC_VERSION"

- name: Install Aztec CLI
run: |
curl -s https://install.aztec.network > tmp.sh
VERSION=${{ steps.aztec-version.outputs.version }} bash tmp.sh <<< yes "yes"
- name: Update path
run: echo "/home/runner/.aztec/bin" >> $GITHUB_PATH

- name: Set Aztec version
run: |
VERSION=${{ steps.aztec-version.outputs.version }} aztec-up

# This is a temporary hack to fix a problem with v3 releases.
- name: Manually tag the aztec version as `latest`
run: |
docker tag aztecprotocol/aztec:${{ steps.aztec-version.outputs.version }} aztecprotocol/aztec:latest

- name: Install dependencies
run: yarn --frozen-lockfile
fetch-depth: 0

- name: Compile
run: yarn compile

- name: Codegen
run: aztec codegen target --outdir artifacts

- name: Compile artifacts to JS
run: |
mkdir -p dist/
yarn tsc artifacts/*.ts --outDir dist/ --skipLibCheck --target es2020 --module nodenext --moduleResolution nodenext --resolveJsonModule --declaration
- name: Setup Aztec environment
id: setup-aztec
uses: ./.github/actions/setup-aztec
with:
start-pxe: 'false'
run-codegen: 'true'

- name: Update version
- name: Set canary version
run: yarn version --new-version "0.0.0-${GITHUB_SHA::8}" --no-git-tag-version

- name: Inspect contracts
run: |
for f in target/*.json; do
[ -f "$f" ] || continue
aztec inspect-contract "$f"
done

# TODO: We do several things here:
# 1. Create artifacts directory
# 2. Copy compiled JS artifacts to artifacts/
# 3. Copy compiled Noir contracts (target/) to package root
# 4. Copy deployments.json to package root (if exists)
# 5. Copy README.md and LICENSE to package root
# 6. Create trimmed package.json
- name: Prepare files for release
run: |
mkdir -p export/${{ env.PROJECT_NAME }}/artifacts

# Copy the compiled JS files to artifacts/
cp -r dist/artifacts/* export/${{ env.PROJECT_NAME }}/artifacts/

# Copy compiled Noir contracts to package root
cp -r target export/${{ env.PROJECT_NAME }}/

# Copy deployments.json if it exists
if [ -f "src/deployments.json" ]; then
cp src/deployments.json export/${{ env.PROJECT_NAME }}/
else
echo "src/deployments.json not found, skipping copy"
fi

cp README.md export/${{ env.PROJECT_NAME }}/
cp LICENSE export/${{ env.PROJECT_NAME }}/
- name: Build package
run: yarn build

cat package.json | jq 'del(.scripts, .jest, ."lint-staged", .packageManager, .devDependencies, .dependencies, .engines, .resolutions)' > export/${{ env.PROJECT_NAME }}/package.json
- name: Publish to NPM
run: cd export/${{ env.PROJECT_NAME }} && npm publish --access public --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
249 changes: 0 additions & 249 deletions .github/workflows/compare-benchmark.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/main-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Main Tests

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
uses: defi-wonderland/aztec-ci-actions/.github/workflows/run-tests.yml@v0
secrets: inherit
Loading