From 266d20f224c0775b387f63a6ab6b2af2fe447d7b Mon Sep 17 00:00:00 2001 From: lnash94 Date: Fri, 14 Jun 2024 22:47:40 +0530 Subject: [PATCH 1/2] Change openapi annotation in to read only. --- gradle.properties | 2 +- module-ballerina-openapi/annotation.bal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index b4b7c8c85..c60f98960 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true group=io.ballerina -version=2.0.1-SNAPSHOT +version=2.0.2-SNAPSHOT # Client Native Version clientNativeVersion=1.0.1-SNAPSHOT diff --git a/module-ballerina-openapi/annotation.bal b/module-ballerina-openapi/annotation.bal index 533128ce9..a661c6ad1 100644 --- a/module-ballerina-openapi/annotation.bal +++ b/module-ballerina-openapi/annotation.bal @@ -95,7 +95,7 @@ public type RequestExamples map; # # + response - Response examples # + requestBody - Request examples -public type Examples record {| +public type Examples readonly & record {| map response?; RequestExamples requestBody?; |}; From d68f6cdf2b7309e7ccf27da8b13cf93290d3a0a8 Mon Sep 17 00:00:00 2001 From: lnash94 Date: Tue, 18 Jun 2024 10:21:14 +0530 Subject: [PATCH 2/2] Update central push workflow --- .github/workflows/central-publish.yml | 37 ++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/central-publish.yml b/.github/workflows/central-publish.yml index e118e787d..4750aede6 100644 --- a/.github/workflows/central-publish.yml +++ b/.github/workflows/central-publish.yml @@ -2,6 +2,15 @@ name: Publish to the Ballerina central on: workflow_dispatch: + inputs: + environment: + type: choice + description: Select environment + required: true + options: + - CENTRAL + - DEV CENTRAL + - STAGE CENTRAL jobs: publish-release: @@ -16,8 +25,11 @@ jobs: java-version: 17.0.7 - name: Grant execute permission for gradlew run: chmod +x gradlew - - name: Publish artifact + - name: Ballerina Central Push + if: ${{ github.event.inputs.environment == 'CENTRAL' }} env: + BALLERINA_DEV_CENTRAL: false + BALLERINA_STAGE_CENTRAL: false BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_ACCESS_TOKEN }} packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} @@ -26,3 +38,26 @@ jobs: nexusPassword: ${{ secrets.NEXUS_PASSWORD }} run: | ./gradlew clean build -PpublishToCentral=true + + - name: Ballerina Central Dev Push + if: ${{ github.event.inputs.environment == 'DEV CENTRAL' }} + env: + BALLERINA_DEV_CENTRAL: true + BALLERINA_STAGE_CENTRAL: false + BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_DEV_ACCESS_TOKEN }} + packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} + packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} + run: | + ./gradlew clean build -PpublishToCentral=true + - name: Ballerina Central Stage Push + if: ${{ github.event.inputs.environment == 'STAGE CENTRAL' }} + env: + BALLERINA_DEV_CENTRAL: false + BALLERINA_STAGE_CENTRAL: true + BALLERINA_CENTRAL_ACCESS_TOKEN: ${{ secrets.BALLERINA_CENTRAL_STAGE_ACCESS_TOKEN }} + packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} + packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} + run: | + ./gradlew clean build -PpublishToCentral=true