Merge pull request #46 from Nuvindu/new-apis #716
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
name: Build | |
on: | |
repository_dispatch: | |
types: [stdlib-publish-snapshot] | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
env: | |
packageUser: ${{ secrets.BALLERINA_BOT_USERNAME }} | |
packagePAT: ${{ secrets.BALLERINA_BOT_TOKEN }} | |
run: | | |
./gradlew publish | |
- name: Dispatch Dependent Module Builds | |
if: github.event.action != 'stdlib-publish-snapshot' | |
run: | | |
echo "Triggering dependent module builds..." && \ | |
curl -u ${{ secrets.BALLERINA_BOT_USERNAME }} -X POST \ | |
https://api.github.com/repos/ballerina-platform/ballerina-standard-library/dispatches \ | |
-H 'Accept: application/vnd.github.v3+json' \ | |
-H 'Authorization: token ${{ secrets.BALLERINA_BOT_TOKEN }}' \ | |
--data '{ | |
"event_type": "stdlib-module-push", | |
"client_payload": { | |
"module": "${{ github.repository }}" | |
} | |
}' |