Release 11.0.0.17930
[platform/core/csapi/tizenfx.git] / .github / workflows / build-branches.yml
1 name: Build Branches
2
3 on:
4   push:
5     branches:
6     - master
7     - DevelNUI
8     - API*
9
10     paths:
11     - 'build/**'
12     - 'internals/**'
13     - 'src/**'
14     - 'tools/**'
15     - '.github/workflows/**'
16
17 jobs:
18   build:
19     runs-on: ubuntu-20.04
20     steps:
21     - uses: actions/checkout@v3
22
23     - name: Setup .NET Core
24       uses: actions/setup-dotnet@v3
25       with:
26         dotnet-version: 3.1.402
27
28     - name: Build
29       run: ./build.sh full
30
31     - name: Checkout APITool
32       uses: actions/checkout@v3
33       with:
34         repository: TizenAPI/APITool
35         path: .apitool
36
37     - name: Extract API
38       run: |
39         dotnet run -p .apitool/ \
40             -- print --format=json --include-hidden \
41             -o Artifacts/api.json Artifacts/bin/public/
42
43     - name: Checkout APISpec
44       uses: actions/checkout@v3
45       with:
46         repository: TizenAPI/tizenfx-api-specs
47         token: ${{ secrets.TIZENAPI_GITHUB_TOKEN }}
48         path: .apispec
49     
50     - name: Push to APISpec
51       working-directory: .apispec
52       run: |
53         git config --global user.name "TizenAPI-Bot"
54         git config --global user.email "tizenapi@samsung.net"
55         git checkout --orphan prep
56         gzip -c ../Artifacts/api.json > ${{ github.sha }}.json.gz
57         find . -name "*.json.gz" -type f -mtime +30 -delete
58         git add .
59         git commit -m "Update API spec"
60         git push -f origin HEAD:main