2023-05-16 01:13:31 +00:00
|
|
|
name: 'Changelog Auto Add'
|
2023-06-26 22:07:47 +00:00
|
|
|
on:
|
2023-07-20 00:38:39 +00:00
|
|
|
pull_request_target:
|
2023-06-26 22:07:47 +00:00
|
|
|
types: [opened, synchronize, reopened, edited]
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
prNumber:
|
|
|
|
description: Pull request number
|
|
|
|
required: true
|
2023-05-16 01:13:31 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-06-26 22:07:47 +00:00
|
|
|
add-changelog:
|
|
|
|
name: 'Add changelog to PR'
|
|
|
|
if: ${{ github.event.pull_request.user.login != 'github-actions[bot]' }}
|
2023-05-16 01:13:31 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-06-26 22:07:47 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
issues: write
|
|
|
|
pull-requests: write
|
2023-05-16 01:13:31 +00:00
|
|
|
steps:
|
2023-12-11 07:15:56 +00:00
|
|
|
- name: Checkout
|
2023-06-26 22:07:47 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2023-12-11 07:15:56 +00:00
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
2023-06-26 22:07:47 +00:00
|
|
|
with:
|
2023-12-11 07:15:56 +00:00
|
|
|
install: 'monorepo-utils...'
|
|
|
|
build: 'monorepo-utils'
|
2023-06-26 22:07:47 +00:00
|
|
|
|
2023-12-11 07:15:56 +00:00
|
|
|
- name: Generate Changelog File
|
2023-06-26 22:07:47 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: pnpm utils changefile ${{github.event.number || inputs.prNumber}} -o ${{ github.repository_owner }}
|