Skip to content
Merged
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
157 changes: 0 additions & 157 deletions .github/actions/setup-k8s-terraform/action.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/release-please-v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"group-pull-request-title-pattern": "chore(v2): Release ${version}",
"pull-request-header": "Pending Aztec Packages v2 release",
"versioning": "always-bump-patch",
"include-component-in-tag": false,
"changelog-sections": [
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "chore", "section": "Miscellaneous", "hidden": false },
{ "type": "test", "section": "Miscellaneous", "hidden": false },
{ "type": "refactor", "section": "Miscellaneous", "hidden": false },
{ "type": "docs", "section": "Documentation", "hidden": false }
],
"packages": {
".": {
"release-type": "simple"
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/ci3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
exec ./ci.sh docs
elif [ "${CI_BARRETENBERG:-0}" -eq 1 ]; then
exec ./ci.sh barretenberg
elif [ "${{ contains(github.ref, '-nightly.') }}" == "true" ]; then
elif [ "${{ contains(github.ref, '-nightly.') }}" == "true" ] || [ "${{ contains(github.ref, '-rc.') }}" == "true" ]; then
exec ./ci.sh nightly
elif [ "${{ startsWith(github.ref, 'refs/tags/v') }}" == "true" ]; then
exec ./ci.sh release
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/create-release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Create Release Branch

# Take the current version from the release-please-manifest.json file on `next`,
# and create a release branch for it. Then update the release-please-manifest.json file on `next` to the next version.

on:
workflow_dispatch:
inputs:
source_commit:
description: "Source commit SHA from next branch"
required: true
type: string

env:
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}

jobs:
create-release-branch:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: ${{ github.event.inputs.source_commit }}
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
fetch-depth: 0

- name: Configure Git
run: |
git config --global user.name "AztecBot"
git config --global user.email "[email protected]"

- name: Create release branch
run: |
# Get the version from the release-please-manifest.json file
CURRENT_VERSION=$(jq -r '."."' .release-please-manifest.json)

# grab major version
CURRENT_MAJOR_VERSION="${CURRENT_VERSION%%.*}"

# create branch name
BRANCH_NAME="v${CURRENT_MAJOR_VERSION}"

# Check if branch already exists
if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then
echo "Error: Branch $BRANCH_NAME already exists"
exit 1
fi

# Create and push the branch
git checkout -b "$BRANCH_NAME"
git push origin "$BRANCH_NAME"

# increment major version
NEXT_MAJOR_VERSION=$((CURRENT_MAJOR_VERSION + 1))
NEXT_VERSION="${NEXT_MAJOR_VERSION}.0.0"

# update release-please-manifest.json on `next` branch
git fetch origin next
git checkout -B next origin/next
jq --arg version "$NEXT_VERSION" '.["."] = $version' .release-please-manifest.json > temp.json && mv temp.json .release-please-manifest.json
git add .release-please-manifest.json
git commit -m "chore(release): update release-please-manifest.json to $NEXT_VERSION"
git push origin next
100 changes: 100 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: release-please
on:
push:
branches:
- "v[0-9]*"
- master

permissions:
Expand All @@ -27,6 +28,105 @@ jobs:
config-file: .github/release-please-${{ github.ref_name }}.json
target-branch: ${{ github.ref_name }}

auto-tag:
needs: [release-please]
if: ${{ startsWith(github.ref, 'refs/heads/v') }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}

- name: Extract version from branch name
id: version
run: |
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
MAJOR_VERSION="${BRANCH_NAME#v}"
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "major=$MAJOR_VERSION" >> $GITHUB_OUTPUT

- name: Determine next version
id: next_version
run: |
# Read current version from release-please manifest and use it directly
if [ ! -f .release-please-manifest.json ]; then
echo "Error: .release-please-manifest.json not found"
exit 1
fi

MANIFEST_VERSION=$(jq -r '."."' .release-please-manifest.json)
echo "Manifest version: $MANIFEST_VERSION"

# Ensure manifest major matches vX branch major
BRANCH_MAJOR="${{ steps.version.outputs.major }}"
if [ -z "$BRANCH_MAJOR" ]; then
echo "Error: Branch major version not available from previous step"
exit 1
fi

MANIFEST_MAJOR="${MANIFEST_VERSION%%.*}"
if [ "$MANIFEST_MAJOR" != "$BRANCH_MAJOR" ]; then
echo "Error: Manifest major ($MANIFEST_MAJOR) does not match branch major ($BRANCH_MAJOR)"
exit 1
fi

if [[ "$MANIFEST_VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
NEXT_VERSION="$MANIFEST_VERSION"
else
echo "Error: Invalid manifest version format"
exit 1
fi

echo "version=$NEXT_VERSION" >> $GITHUB_OUTPUT
echo "Next version will be: $NEXT_VERSION"

- name: Get next RC number
id: rc
run: |
# Get all existing RC tags for this specific version
EXISTING_TAGS=$(git tag -l "v${{ steps.next_version.outputs.version }}-rc.*" | sort -V)

if [ -z "$EXISTING_TAGS" ]; then
# No RC tags exist yet for this version, start with 1
NEXT_RC=1
else
# Extract the highest RC number and increment
LAST_TAG=$(echo "$EXISTING_TAGS" | tail -n 1)
LAST_RC=$(echo "$LAST_TAG" | sed 's/.*-rc\.\([0-9]\+\)$/\1/')
NEXT_RC=$((LAST_RC + 1))
fi

echo "number=$NEXT_RC" >> $GITHUB_OUTPUT
echo "Next RC number: $NEXT_RC"

- name: Check if commit already tagged
id: check_tag
run: |
# Check if current commit already has any RC tag
EXISTING_TAGS=$(git tag --points-at HEAD | grep "^v.*-rc\." || true)

if [ -n "$EXISTING_TAGS" ]; then
echo "Commit already tagged as: $EXISTING_TAGS"
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT
fi

- name: Create and push new RC tag
if: steps.check_tag.outputs.skip != 'true'
run: |
TAG_NAME="v${{ steps.next_version.outputs.version }}-rc.${{ steps.rc.outputs.number }}"

# Create annotated tag
git tag -a "$TAG_NAME" -m "Release candidate ${{ steps.rc.outputs.number }} for v${{ steps.next_version.outputs.version }}"
git push origin "$TAG_NAME"

echo "✅ Created tag: $TAG_NAME"

update-docs:
name: Update docs
env:
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.2.1"
".": "2.0.0"
}
Loading