diff --git a/.github/workflows/check_changelog.yml b/.github/workflows/check_changelog.yml new file mode 100644 index 0000000..c0cc43b --- /dev/null +++ b/.github/workflows/check_changelog.yml @@ -0,0 +1,20 @@ +name: Check Changelog + +on: + pull_request: + types: [opened, reopened, labeled, unlabeled, synchronize] + +permissions: + contents: read + +jobs: + check-changelog: + runs-on: ubuntu-latest + if: (!contains(github.event.pull_request.labels.*.name, 'skip changelog')) + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Check that CHANGELOG is touched + run: | + git fetch origin ${{ github.base_ref }} --depth 1 && \ + git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc2aa92..8a6a397 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,20 @@ on: pull_request: jobs: + check_publishable: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Update Rust toolchain + # Most of the time this will be a no-op, since GitHub releases new images every week + # which include the latest stable release of Rust, Rustup, Clippy and rustfmt. + run: rustup update + - name: Rust Cache + uses: Swatinem/rust-cache@v2.7.1 + - name: Check cargo publish + run: cargo publish --dry-run + lint: runs-on: ubuntu-22.04 steps: