Skip to content

Commit

Permalink
ci: add job to enforce updates to the changelog (#483)
Browse files Browse the repository at this point in the history
Co-authored-by: Tomás Grüner <[email protected]>
  • Loading branch information
ricomateo and MegaRedHand authored Feb 17, 2025
1 parent 97a3a43 commit 5df9284
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Pull Request Workflow"
on:
merge_group:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

env:
PR_URL: https://github.com/Layr-Labs/eigensdk-rs/pull/${{ github.event.number }}

jobs:
# Enforces the update of a changelog file on every pull request
# The update in the changelog can be skipped if the pull request
# includes the `changelog-ignore` label.
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check CHANGELOG.md is updated
uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: changelog-ignore

- name: Check the PR URL is included in CHANGELOG.md
if: contains(github.event.pull_request.labels.*.name, 'changelog-ignore') == false
run: git diff CHANGELOG.md | grep $PR_URL CHANGELOG.md
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Each version will have a separate `Breaking Changes` section as well. To describe in how to upgrade from one version to another if needed

## [Unreleased]
### Added
### Changed
### Breaking changes
### Removed

0 comments on commit 5df9284

Please sign in to comment.