Skip to content

Commit

Permalink
feat: Add a release-soon workflow to check if we should release soon.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jan 3, 2025
1 parent 59f72a8 commit 896fa71
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release-soon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
workflow_call:
inputs:
max-commits-since-last-release:
required: false
type: number
default: 15

jobs:
check-release:
permissions:
pull-requests: write
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Validate PR
id: validate
run: echo "commits_since_last_release=$(git rev-list --count $(git describe --tags --abbrev=0 --match 'v*')..HEAD)" >>$GITHUB_OUTPUT
- name: Warn if close to 100 commits since last release
if: steps.validate.outputs.commits-since-last-release >= inputs.max-commits-since-last-release
uses: thollander/actions-comment-pull-request@v3
with:
message: |
:warning: There are ${{ steps.validate.outputs.commits_since_last_release }} commits since the last release. Consider releasing soon.
comment-tag: execution

0 comments on commit 896fa71

Please sign in to comment.