56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
|
name: Pre build step - Compile changelog file
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
inputs:
|
||
|
version:
|
||
|
description: 'Version override. Default version is fetched from monthly release calendar, you can override the version but make sure the that the branch release/{version} exists on remote.'
|
||
|
required: false
|
||
|
default: ''
|
||
|
|
||
|
env:
|
||
|
GIT_COMMITTER_NAME: 'WooCommerce Bot'
|
||
|
GIT_COMMITTER_EMAIL: 'no-reply@woocommerce.com'
|
||
|
GIT_AUTHOR_NAME: 'WooCommerce Bot'
|
||
|
GIT_AUTHOR_EMAIL: 'no-reply@woocommerce.com'
|
||
|
|
||
|
jobs:
|
||
|
build-prep:
|
||
|
name: Create changelog PR
|
||
|
runs-on: ubuntu-20.04
|
||
|
permissions:
|
||
|
contents: write
|
||
|
pull-requests: write
|
||
|
steps:
|
||
|
- name: Checkout code
|
||
|
uses: actions/checkout@v3
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
|
||
|
- name: Setup PNPM
|
||
|
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
|
||
|
|
||
|
- name: Setup Node
|
||
|
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
|
||
|
with:
|
||
|
node-version-file: .nvmrc
|
||
|
cache: pnpm
|
||
|
registry-url: 'https://registry.npmjs.org'
|
||
|
|
||
|
- name: Install prerequisites
|
||
|
run: |
|
||
|
pnpm install --filter monorepo-utils --ignore-scripts
|
||
|
# ignore scripts speeds up setup signficantly, but we still need to build monorepo utils
|
||
|
pnpm build
|
||
|
working-directory: tools/monorepo-utils
|
||
|
|
||
|
- name: 'Get the versions for the accelerated and monthly releases'
|
||
|
id: get-versions
|
||
|
if: ${{ github.event.inputs.version == '' }}
|
||
|
run: pnpm utils code-freeze get-version
|
||
|
|
||
|
- name: Generate changelog changes and create PR
|
||
|
id: changelog
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
run: pnpm utils code-freeze changelog -o ${{ github.repository_owner }} -v ${{ github.event.inputs.version || steps.get-versions.outputs.monthlyVersionXY }}
|