2022-06-23 02:04:43 +00:00
name : Prepare package release
on :
workflow_dispatch :
inputs :
packages :
2023-06-29 01:28:19 +00:00
description : 'Enter a specific package to release, or packages separated by commas, ie @woocommerce/components,@woocommerce/number. Leaving this input to the default "-a" will prepare to release all eligible packages.'
2022-06-23 02:04:43 +00:00
required : false
default : '-a'
2023-01-02 17:28:11 +00:00
permissions : {}
2022-06-23 02:04:43 +00:00
jobs :
prepare :
2022-06-29 01:41:43 +00:00
name : Run prepare script
2022-06-23 02:04:43 +00:00
runs-on : ubuntu-20.04
2023-01-02 17:28:11 +00:00
permissions :
2023-02-13 11:27:50 +00:00
contents : write
pull-requests : write
2022-06-23 02:04:43 +00:00
steps :
2023-11-27 23:19:28 +00:00
- uses : actions/checkout@v3
with :
fetch-depth : '0'
- name : Setup WooCommerce Monorepo
uses : ./.github/actions/setup-woocommerce-monorepo
2023-11-17 17:52:19 +00:00
with :
install : true
build : './tools/package-release'
2024-07-10 12:39:49 +00:00
pull-package-deps : 'tools/package-release'
2023-11-27 23:19:28 +00:00
- name : Execute script
run : ./tools/package-release/bin/dev prepare ${{ github.event.inputs.packages }}
- name : Print git status
run : git status
- name : Get current date
id : date
2023-11-27 23:33:48 +00:00
run : echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_OUTPUT
2023-11-27 23:19:28 +00:00
- name : Set all package string
id : all_description
if : ${{ github.event.inputs.packages == '-a'}}
run : echo "str=all packages" >> $GITHUB_OUTPUT
- name : Set Specific packages string
id : specific_description
if : ${{ github.event.inputs.packages != '-a'}}
run : echo "str=${{ github.event.inputs.packages }}" >> $GITHUB_OUTPUT
- name : Create Pull Request
uses : peter-evans/create-pull-request@v4
with :
token : ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Automated change : Prep ${{ steps.all_description.outputs.str || steps.specific_description.outputs.str }} for release.'
2023-11-27 23:33:48 +00:00
branch : release/packages-${{ steps.date.outputs.date }}
2023-11-27 23:19:28 +00:00
delete-branch : true
title : Prepare Packages for Release
reviewers : ${{ github.actor }}
body : |
# Prepare ${{ steps.all_description.outputs.str || steps.specific_description.outputs.str }} for release.
This PR has been autogenerated by [Prepare Package Release workflow](https://github.com/woocommerce/woocommerce/actions/workflows/prepare-package-release.yml) in run [${{ github.run_id }}](https://github.com/woocommerce/woocommerce/actions/runs/${{ github.run_id }})