2022-07-14 04:58:47 +00:00
name : Package release
on :
workflow_dispatch :
inputs :
packages :
description : 'Enter a specific package to release, or releases separated by commas, ie @woocommerce/components,@woocommerce/number. Leaving this input blank will release all eligible packages.'
required : false
default : '-a'
2023-11-16 19:44:22 +00:00
dry_run :
description : 'Perform a dry run. Complete all steps but dont actually make the release.'
type : boolean
required : false
2023-01-02 17:28:11 +00:00
permissions : {}
2022-07-14 04:58:47 +00:00
jobs :
2022-07-22 00:08:11 +00:00
release :
name : Run packages release script
2022-07-14 04:58:47 +00:00
runs-on : ubuntu-20.04
2023-01-02 17:28:11 +00:00
permissions :
2024-02-01 17:23:26 +00:00
contents : read
2022-07-14 04:58:47 +00:00
steps :
2022-07-22 00:08:11 +00:00
- uses : actions/checkout@v3
2024-02-01 17:23:26 +00:00
2022-09-13 01:55:03 +00:00
- name : Setup WooCommerce Monorepo
uses : ./.github/actions/setup-woocommerce-monorepo
2023-11-17 17:52:19 +00:00
with :
2024-02-01 17:23:26 +00:00
install : true
build : './tools/package-release'
2022-07-22 00:08:11 +00:00
2023-11-16 19:44:22 +00:00
- name : Clean working directory
run : git checkout pnpm-lock.yaml # in case for whatever reason the lockfile is out of sync, there won't be interference with npm publish.
2022-07-22 00:08:11 +00:00
- name : Execute script
2024-02-01 17:23:26 +00:00
run : |
npm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
./tools/package-release/bin/dev publish ${{ github.event.inputs.packages }} --branch=${{ github.ref_name }} ${{ ( github.event.inputs.dry_run == 'true' && '--dry-run' ) || '' }} --skip-install
2022-07-22 00:08:11 +00:00
env :
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}