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
3 changes: 3 additions & 0 deletions .github/workflows/langchain-interpreter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- name: Run tests
run: uv run pytest

- name: Check formatting
run: uv run ruff format --check .

- name: Lint with ruff
run: uv run ruff check .

Expand Down
228 changes: 0 additions & 228 deletions .github/workflows/release-common.yml

This file was deleted.

101 changes: 101 additions & 0 deletions .github/workflows/release-finalize.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Release Finalize

on:
workflow_call:
inputs:
tag:
description: 'Git tag to create (e.g., afm-core-v0.1.0 or ballerina-interpreter-v0.1.0)'
required: true
type: string
implementation:
description: 'Implementation directory name'
required: true
type: string
version:
description: 'Version being released (e.g., 0.1.0)'
required: true
type: string
branch:
description: 'Branch to release from'
required: true
type: string
is_rerelease:
description: 'Whether this is a re-release'
required: false
default: false
type: boolean

jobs:
finalize:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
fetch-depth: 0

- name: Create release branch, tag, and push
env:
TAG: ${{ inputs.tag }}
IMPLEMENTATION: ${{ inputs.implementation }}
VERSION: ${{ inputs.version }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b "release-${TAG%-v*}-$VERSION"
git tag "$TAG"
git push origin "release-${TAG%-v*}-$VERSION"
git push origin "$TAG"

- name: Generate release notes
env:
TAG: ${{ inputs.tag }}
IMPLEMENTATION: ${{ inputs.implementation }}
VERSION: ${{ inputs.version }}
IS_RERELEASE: ${{ inputs.is_rerelease }}
run: |
# Find previous tag for this implementation (exclude current version)
PREV_TAG=$(git tag -l "${TAG%-v*}-v*" --sort=-v:refname | grep -v "^$TAG$" | head -1)

# Generate notes from commits that touched this implementation
if [ -n "$PREV_TAG" ]; then
echo "Generating notes since $PREV_TAG"
COMMITS=$(git log "$PREV_TAG..HEAD" --oneline -- "$IMPLEMENTATION/" | head -50)
else
echo "No previous tag found, using recent commits"
COMMITS=$(git log --oneline -50 -- "$IMPLEMENTATION/")
fi

# Format notes
RERELEASE_NOTE=""
if [ "$IS_RERELEASE" = "true" ]; then
RERELEASE_NOTE="

_Re-released version_"
fi

if [ -n "$COMMITS" ]; then
NOTES="## Changes in $IMPLEMENTATION

$COMMITS$RERELEASE_NOTE"
else
NOTES="## Changes in $IMPLEMENTATION

No changes detected in this implementation directory.$RERELEASE_NOTE"
fi

echo "$NOTES" > release_notes.md

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ inputs.tag }}
VERSION: ${{ inputs.version }}
run: |
TITLE="${TAG%-v*} v$VERSION"
gh release create "$TAG" \
--title "$TITLE" \
--notes-file release_notes.md
Loading
Loading