- name: Build
run: ./build.sh full
+ - name: Checkout APITool
+ uses: actions/checkout@v2
+ with:
+ repository: TizenAPI/APITool
+ path: .apitool
+
+ - name: Extract API
+ run: |
+ dotnet run -p .apitool/ \
+ -- print --format=json --include-hidden \
+ -o Artifacts/api.json Artifacts/bin/public/
+
+ - name: Upload API Spec to S3
+ uses: TizenAPI/tizenfx-build-actions/s3-upload@master
+ env:
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ with:
+ file: Artifacts/api.json
+ region: ap-northeast-2
+ bucket: tizenfx-api-specs
+ key: ${{ github.sha }}.json
repository: TizenAPI/APITool
path: .apitool
- - name: Extract API
+ - name: Extract API Spec
run: |
dotnet run -p .apitool/ \
-- print --format=json --include-hidden \
needs: [build]
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- with:
- ref: ${{ github.base_ref }}
-
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
+ - name: Download Artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: reports
+ path: Artifacts
+
+ - name: Download Base API Spec
+ id: base-spec
+ uses: TizenAPI/tizenfx-build-actions/s3-download-public@master
+ with:
+ region: ap-northeast-2
+ bucket: tizenfx-api-specs
+ key: ${{ github.event.pull_request.base.sha }}.json
+ path: Artifacts/base-api.json
+
+ - uses: actions/checkout@v2
+ if: ${{ steps.base-spec.outputs.code != 200 }}
+ with:
+ ref: ${{ github.event.pull_request.base.sha }}
+ path: base
+
- name: Build Base Branch
+ if: ${{ steps.base-spec.outputs.code != 200 }}
uses: TizenAPI/tizenfx-build-actions/problem-filter@master
with:
run: ./build.sh full
+ working-directory: base
- name: Checkout APITool
+ if: ${{ steps.base-spec.outputs.code != 200 }}
uses: actions/checkout@v2
with:
repository: TizenAPI/APITool
path: .apitool
- name: Extract Base API
+ if: ${{ steps.base-spec.outputs.code != 200 }}
run: |
dotnet run -p .apitool/ \
-- print --format=json --include-hidden \
- -o Artifacts/base-api.json Artifacts/bin/public/
-
- - name: Download Artifacts
- uses: actions/download-artifact@v2
- with:
- name: reports
- path: Artifacts
+ -o Artifacts/base-api.json base/Artifacts/bin/public/
- name: Check API Compatibilities
uses: TizenAPI/tizenfx-build-actions/apidb-compare@master