-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (39 loc) · 1.24 KB
/
build-master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 }}"
}
}'