-
Notifications
You must be signed in to change notification settings - Fork 818
47 lines (40 loc) · 1.2 KB
/
check-public-api.yaml
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
44
45
name: Check public API
env:
RUST_BACKTRACE: 1
on:
workflow_dispatch:
inputs:
compareMasterWithVersion:
required: false
description: 'Version to compare with (i.e. "1.0.2")'
jobs:
setup:
name: Set up
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.setup.outputs.VERSION }}
SHOULD_CHECK_API: ${{ steps.setup.outputs.SHOULD_CHECK_API }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Generate API change report
shell: bash
run: |
cargo install cargo-public-api
CARGO_LATEST_VERSION = git tag --list | tail -n 1
LATEST_VERSION=${INPUT_COMPAREMASTERWITHVERSION:=$CARGO_LATEST_VERSION}
cargo public-api --manifest-path=lib/api/Cargo.toml --diff-git-checkouts $LATEST_VERSION main > diff.txt
- name: Archive change report
uses: actions/upload-artifact@v4
with:
name: api-diff-report
path: |
diff.txt