-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77c1e74
commit 4e96afd
Showing
10 changed files
with
231 additions
and
373 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,69 @@ | ||
name: Publish OpenAPI CLI tools 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: | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'ballerina-platform' | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'adopt' | ||
java-version: 11 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
env: | ||
packageUser: ${{ github.actor }} | ||
packagePAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./gradlew build -x check -x test | ||
- 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 }} | ||
GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} | ||
run: | | ||
./gradlew clean build :tool-openapi:publishToCentral -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: | | ||
sed -i 's/version=\(.*\)-SNAPSHOT/version=\1/g' gradle.properties | ||
./gradlew clean build :tool-openapi:publishToCentral -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: | | ||
sed -i 's/version=\(.*\)-SNAPSHOT/version=\1/g' gradle.properties | ||
./gradlew clean build :tool-openapi:publishToCentral -PpublishToCentral=true |
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
Empty file.
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
Oops, something went wrong.