From 355ef8188a34d63eb0d93bd8b3329f6a15e68e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 26 Jul 2023 02:09:16 +0200 Subject: [PATCH 1/5] Add workflow to verify `CHANGELOG` is always up-to-date --- .github/workflows/verify.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/verify.yml diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000000..f7342ac1b8 --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,17 @@ +name: Verify +on: + pull_request: + branches: + - master +jobs: + changelog: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Check `CHANGELOG.md` has changes + run: | + ! git diff --exit-code master HEAD CHANGELOG.md + - name: Check `CHANGELOG.md` has PR author + if: ${{ github.event.pull_request.user.name != 'hecrj' }} + run: | + sed -n '/## \[Unreleased\]/,/^## /p' CHANGELOG.md | sed -n '/Many thanks to.../,//p' | grep '@${{ github.event.pull_request.user.name }}' From 269e5410da8a9d04b62671042167ea475283d678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 26 Jul 2023 02:19:25 +0200 Subject: [PATCH 2/5] Fetch all repository history in `verify` workflow --- .github/workflows/verify.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index f7342ac1b8..6f48415a8c 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -8,6 +8,8 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - name: Check `CHANGELOG.md` has changes run: | ! git diff --exit-code master HEAD CHANGELOG.md From d9faf4c9808f9959ac3dcba052c4c2febd1d0481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 26 Jul 2023 02:19:44 +0200 Subject: [PATCH 3/5] Use `login` instead of `name` in `verify` workflow --- .github/workflows/verify.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 6f48415a8c..84778e9196 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -14,6 +14,6 @@ jobs: run: | ! git diff --exit-code master HEAD CHANGELOG.md - name: Check `CHANGELOG.md` has PR author - if: ${{ github.event.pull_request.user.name != 'hecrj' }} + if: ${{ github.event.pull_request.user.login != 'hecrj' }} run: | - sed -n '/## \[Unreleased\]/,/^## /p' CHANGELOG.md | sed -n '/Many thanks to.../,//p' | grep '@${{ github.event.pull_request.user.name }}' + sed -n '/## \[Unreleased\]/,/^## /p' CHANGELOG.md | sed -n '/Many thanks to.../,//p' | grep '@${{ github.event.pull_request.user.login }}' From 0be3fe4ec760dd4eba1b753b87b6f89c61d29747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 26 Jul 2023 02:24:22 +0200 Subject: [PATCH 4/5] Use `origin/master` instead of `master` in `verify` workflow --- .github/workflows/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 84778e9196..3de8a21cf7 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -12,7 +12,7 @@ jobs: fetch-depth: 0 - name: Check `CHANGELOG.md` has changes run: | - ! git diff --exit-code master HEAD CHANGELOG.md + ! git diff --exit-code origin/master HEAD -- CHANGELOG.md - name: Check `CHANGELOG.md` has PR author if: ${{ github.event.pull_request.user.login != 'hecrj' }} run: | From 6531f2789702d3490b3e7b74686c03954fd14a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Wed, 26 Jul 2023 02:30:37 +0200 Subject: [PATCH 5/5] Update `CHANGELOG` --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73a844dd96..b7174bb81b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Viewport` argument to `Widget::on_event`. [#1956](https://github.com/iced-rs/iced/pull/1956) - Nix instructions to `DEPENDENCIES.md`. [#1859](https://github.com/iced-rs/iced/pull/1859) - Loading spinners example. [#1902](https://github.com/iced-rs/iced/pull/1902) +- Workflow that verifies `CHANGELOG` is always up-to-date. [#1970](https://github.com/iced-rs/iced/pull/1970) ### Changed - Updated `wgpu` to `0.16`. [#1807](https://github.com/iced-rs/iced/pull/1807)