Skip to content

build: migrate from release-please to changie #2

build: migrate from release-please to changie

build: migrate from release-please to changie #2

Workflow file for this run

name: PR Validation
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
pull-requests: write
jobs:
# PR title conventional commit validation
title:
name: PR Title
runs-on: ubuntu-latest
if: github.event.pull_request.draft != true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # ratchet:actions/setup-node@v4
with:
node-version: "22"
- name: Install commitlint
run: npm install --save-dev @commitlint/cli @commitlint/config-conventional
- name: Validate PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: echo "$PR_TITLE" | npx commitlint
# Changelog entry check
changelog:
name: Changelog
runs-on: ubuntu-latest
if: github.event.pull_request.draft != true
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # ratchet:actions/checkout@v6
with:
fetch-depth: 0
- uses: tylerbutler/actions/changie-check@4dd5edb0cc1d941b6db7433504e406c001eea748 # ratchet:tylerbutler/actions/changie-check@main
id: changelog
with:
base-sha: ${{ github.event.pull_request.base.sha }}
head-sha: ${{ github.event.pull_request.head.sha }}
- name: Comment with changelog preview
if: steps.changelog.outputs.has-entries == 'true'
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # ratchet:marocchino/sticky-pull-request-comment@v2
with:
header: changelog
message: |
## Changelog Preview
This PR adds the following changelog entries:
${{ steps.changelog.outputs.preview }}
- name: Comment about missing changelog
if: steps.changelog.outputs.has-entries == 'false' && steps.changelog.outputs.needs-entry == 'true'
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # ratchet:marocchino/sticky-pull-request-comment@v2
with:
header: changelog
message: |
## Missing Changelog Entry
This PR includes commits with types that typically require a changelog entry (`${{ steps.changelog.outputs.commit-types-found }}`), but no changie fragment was found.
To add one, run:
```
changie new
```
- name: Remove changelog comment
if: steps.changelog.outputs.has-entries == 'false' && steps.changelog.outputs.needs-entry == 'false'
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # ratchet:marocchino/sticky-pull-request-comment@v2
with:
header: changelog
delete: true