|
9 | 9 |
|
10 | 10 | name: Build Extension |
11 | 11 |
|
12 | | -on: [push, pull_request, workflow_dispatch] |
| 12 | +on: |
| 13 | + push: |
| 14 | + pull_request: |
| 15 | + workflow_dispatch: |
| 16 | + inputs: |
| 17 | + deploy: |
| 18 | + description: 'Deploy to Maven Central' |
| 19 | + type: boolean |
| 20 | + default: false |
13 | 21 |
|
14 | 22 | env: |
15 | 23 | DAP_PORT: 10000 |
@@ -531,3 +539,40 @@ jobs: |
531 | 539 | debuggee/logs/ |
532 | 540 | debuggee/lucee-server/context/logs/ |
533 | 541 | debuggee/lucee-server/context/cfclasses/ |
| 542 | +
|
| 543 | + # Deploy to Maven Central (manual only, requires checkbox) |
| 544 | + deploy: |
| 545 | + name: Deploy to Maven Central |
| 546 | + runs-on: ubuntu-latest |
| 547 | + needs: [test-lucee-71, test-agent] |
| 548 | + if: github.event_name == 'workflow_dispatch' && inputs.deploy && github.ref == 'refs/heads/main' |
| 549 | + |
| 550 | + steps: |
| 551 | + - name: Checkout |
| 552 | + uses: actions/checkout@v4 |
| 553 | + |
| 554 | + - name: Set up JDK 21 |
| 555 | + uses: actions/setup-java@v4 |
| 556 | + with: |
| 557 | + java-version: '21' |
| 558 | + distribution: 'temurin' |
| 559 | + server-id: ossrh |
| 560 | + server-username: MAVEN_USERNAME |
| 561 | + server-password: MAVEN_PASSWORD |
| 562 | + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} |
| 563 | + gpg-passphrase: GPG_PASSPHRASE |
| 564 | + |
| 565 | + - name: Deploy extension to Maven Central |
| 566 | + run: mvn -B -e clean install -Dgoal=deploy |
| 567 | + env: |
| 568 | + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} |
| 569 | + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |
| 570 | + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
| 571 | + |
| 572 | + - name: Deploy agent to Maven Central |
| 573 | + working-directory: agent |
| 574 | + run: mvn -B -e clean deploy -DperformRelease=true --settings maven-settings.xml |
| 575 | + env: |
| 576 | + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} |
| 577 | + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} |
| 578 | + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
0 commit comments