Skip to content

Testing, fixes, actions #12

Testing, fixes, actions

Testing, fixes, actions #12

Workflow file for this run

name: public-api 🌐
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: check API
runs-on: ubuntu-latest
steps:
- name: Install nightly & cargo-public-api
run: |
set -euxo pipefail
rustup install nightly-2024-07-05 --profile minimal
mv ~/.rustup/toolchains/nightly-2024-07-05-x86_64-unknown-linux-gnu ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu
- name: Install public-api
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-public-api
locked: true
- name: Checkout
uses: actions/checkout@v4
- name: Check API
run: |
api_diff=$(cargo public-api diff)
echo "::set-output name=api_diff::$api_diff"
- name: Create comment
if: ${{ github.event.pull_request }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
```rust
${{ steps.check_api.outputs.api_diff }}
```
reactions: "+1"