Generate Changelogs #277
This file contains hidden or 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
| name: Generate Changelogs | |
| on: | |
| # Run after jar indexing completes | |
| workflow_run: | |
| workflows: ["Index Jar Metadata"] | |
| types: | |
| - completed | |
| # Manual trigger | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Minecraft version (e.g., 1.21.11)' | |
| required: true | |
| previous_version: | |
| description: 'Previous version (e.g., 1.21.10)' | |
| required: true | |
| project: | |
| description: 'Project (all, vanilla, paper, spigot)' | |
| required: false | |
| default: 'all' | |
| jobs: | |
| generate-changelogs: | |
| runs-on: ubuntu-latest | |
| # Only run if workflow_run succeeded OR if manually triggered | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: cd indexers && bun install | |
| - name: Generate changelogs (manual) | |
| if: github.event_name == 'workflow_dispatch' | |
| working-directory: indexers | |
| env: | |
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
| SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| STORE_CHANGELOGS: "true" | |
| run: | | |
| bun run generate-changelogs.ts "${{ github.event.inputs.version }}" "${{ github.event.inputs.previous_version }}" "${{ github.event.inputs.project }}" | |
| - name: Detect new versions and generate changelogs | |
| if: github.event_name == 'workflow_run' | |
| working-directory: indexers | |
| env: | |
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
| SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| STORE_CHANGELOGS: "true" | |
| run: | | |
| # Get recent versions from Minecraft launcher manifest | |
| # and generate changelogs for any new ones | |
| bun run generate-changelogs-auto.ts | |