-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Release on push to main (#35)
- Loading branch information
Showing
5 changed files
with
106 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: read | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pdm | ||
pdm install | ||
- name: Build Release Files | ||
run: | | ||
pdm run python build_release.py | ||
- name: Create Release | ||
id: create_release | ||
uses: rymndhng/release-on-push-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
bump_version_scheme: minor | ||
tag_prefix: v | ||
release_name: "Release <RELEASE_VERSION>" | ||
|
||
- name: Upload Release Assets | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
for file in dist/*; do | ||
if [ -f "$file" ]; then | ||
gh release upload "${{ steps.create_release.outputs.tag_name }}" "$file" --clobber | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,4 +182,6 @@ evals/**/backend | |
__pycache__/ | ||
convex-local-backend | ||
|
||
.pdm-python | ||
.pdm-python | ||
|
||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
from runner.models.anthropic_codegen import build_release_rules as build_anthropic_rules | ||
from runner.models.openai_codegen import build_release_rules as build_openai_rules | ||
|
||
MDC_FRONTMATTER = """--- | ||
description: Guidelines and best practices for building Convex projects, including database schema design, queries, mutations, and real-world examples | ||
globs: **/*.{ts,tsx,js,jsx} | ||
--- | ||
""" | ||
|
||
def main(): | ||
os.makedirs("dist", exist_ok=True) | ||
|
||
# Generate rules (we could do more model-specific ones in the future) | ||
# Using a very specific filename here to make it clear for AI usage what this is. | ||
|
||
with open("dist/anthropic_convex_rules.txt", "w") as f: | ||
f.write(build_anthropic_rules()) | ||
|
||
with open("dist/openai_convex_rules.txt", "w") as f: | ||
f.write(build_openai_rules()) | ||
|
||
# Generate MDC files with frontmatter | ||
with open("dist/anthropic_convex_rules.mdc", "w") as f: | ||
f.write(MDC_FRONTMATTER) | ||
f.write(build_anthropic_rules()) | ||
|
||
with open("dist/openai_convex_rules.mdc", "w") as f: | ||
f.write(MDC_FRONTMATTER) | ||
f.write(build_openai_rules()) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters