Package Release: Make sure git workspace is clean before releasing (#41416)

This commit is contained in:
Paul Sealock 2023-11-17 08:44:22 +13:00 committed by GitHub
parent 30a07536a8
commit 251812232d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -6,6 +6,10 @@ on:
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'
dry_run:
description: 'Perform a dry run. Complete all steps but dont actually make the release.'
type: boolean
required: false
permissions: {}
@ -21,7 +25,10 @@ jobs:
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
- 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.
- name: Execute script
run: ./tools/package-release/bin/dev publish ${{ github.event.inputs.packages }} --branch=${{ github.ref_name }} --skip-install
run: ./tools/package-release/bin/dev publish ${{ github.event.inputs.packages }} --branch=${{ github.ref_name }} ${{ ( github.event.inputs.dry_run == 'true' && '--dry-run' ) || '' }} --skip-install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}