Skip to content

Publish all .g4 files as a zip to maven #3657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahkcs
Copy link
Contributor

@ahkcs ahkcs commented May 22, 2025

This PR adds a GitHub Actions workflow that automatically packages and publishes ANTLR grammar files (.g4) from the language-grammar/src/main/antlr4 directory(containing all the existing .g4 files from opensearch-sql and opensearch-spark repo to the Maven snapshot repository.

Implementation Details

The workflow:

Packages all ANTLR .g4 grammar files into a single ZIP file
Creates the necessary directory structure in the Maven repository
Publishes the ZIP to https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/opensearch-language-grammar
Generates appropriate Maven metadata including POM files and checksum files
Tags the published artifacts with the source commit ID for traceability

Purpose

This allows grammar files to be versioned and distributed separately from the main codebase, enabling:

Grammar reuse across different projects

Independent versioning of grammar definitions

Easier integration of our grammar definitions in third-party tools

Testing

The workflow was tested by manually triggering it and verifying the artifacts were correctly published to the Maven repository at the specified path.

Copy link
Collaborator

@noCharger noCharger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. need rebase after async-query-core change merged
  2. g4 file from opensearch-spark is the source of truth
  3. let's refactor the .yml to offload common actions to build.gradle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants