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
40 changes: 40 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
pull_request:
branches: [ main ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Limpiar instalaciones previas y reinstalar dependencias
run: |
rm -rf node_modules package-lock.json
npm install

- name: Execute Linter
run: npm run lint # Valida que el código siga las convenciones de formato [6]


build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Limpiar instalaciones previas y reinstalar dependencias
run: |
rm -rf node_modules package-lock.json
npm install
- run: npm run build
67 changes: 67 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release Management

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
body: ${{ steps.release.outputs.body }}
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
token: ${{ secrets.GITHUB_TOKEN }}

generate-release-notes:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: AI Release Notes Generation
id: ai-notes
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
RELEASE_BODY: ${{ needs.release-please.outputs.body }}
run: |
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "Eres un experto redactor técnico. Tu tarea es transformar una lista de commits técnicos en Release Notes amigables, estructuradas y orientadas al valor para el usuario. Usa emojis y secciones claras (Novedades, Correcciones, Mejoras)."
},
{
"role": "user",
"content": "Convierte estos commits en notas de lanzamiento profesionales: '"$RELEASE_BODY"'"
}
]
}' > ai_response.json

# Corrección: Se ajustó la ruta de jq para acceder al primer elemento de choices
echo "PROMPT_RESPONSE=$(jq -r '.choices[0].message.content' ai_response.json)" >> $GITHUB_ENV

- name: Update GitHub Release with AI Notes
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.release-please.outputs.tag_name }}
body: ${{ env.PROMPT_RESPONSE }}
append_body: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/security-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Security Review

permissions:
pull-requests: write # Needed for leaving PR comments
contents: read

on:
pull_request:

jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 2

- uses: anthropics/claude-code-security-review@main
with:
comment-pr: true
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
Loading
Loading