From 77edd8f999e0b834dc6a2d6068f9396a456ab9b4 Mon Sep 17 00:00:00 2001 From: Cat Chen Date: Mon, 26 Dec 2022 15:43:36 -0800 Subject: [PATCH 1/3] Introduced diff-targets to the release workflow; fixed dry-run for the publish job in the release workflow --- .github/workflows/release.yml | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1f2a74c..5a33ebbc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,11 +21,6 @@ on: prerelease: description: 'Prerelease' required: true - default: true - type: boolean - dry-run: - description: 'Dry run' - required: true default: false type: boolean skip-if-no-diff: @@ -33,6 +28,16 @@ on: required: true default: false type: boolean + diff-targets: + description: 'Diff Targets' + required: false + default: 'dist/**/*' + type: string + dry-run: + description: 'Dry run' + required: true + default: false + type: boolean jobs: build: @@ -75,12 +80,17 @@ jobs: publish: name: Publish needs: [release] - if: ${{ needs.release.outputs.diff != 'true' }} + if: ${{ needs.release.outputs.skipped != 'true' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + if: ${{ !inputs.dry-run }} with: ref: ${{ needs.release.outputs.tag }} + - uses: actions/checkout@v3 + if: ${{ inputs.dry-run }} + with: + ref: ${{ github.ref_name || github.ref }} - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' @@ -89,9 +99,15 @@ jobs: - env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + DRY_RUN: ${{ inputs.dry-run || false }} run: | yarn install yarn build npm whoami npm config ls -l - npm publish + if [[ "$DRY_RUN" = true ]] + then + npm publish --dry-run + else + npm publish + fi From 0954b8423b72181cb2de4ab3f1cd41905656dec0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Dec 2022 23:44:09 +0000 Subject: [PATCH 2/3] Test base commit for #1487 (21ab188406ea863c5af575bee4f04f1f6a079192) by 2581-1 From b87d8f9d17b3e003398c13d37a2fb6f0aef25fd2 Mon Sep 17 00:00:00 2001 From: Cat Chen Date: Mon, 26 Dec 2022 15:45:23 -0800 Subject: [PATCH 3/3] Test head commit for #1487 (21ab188406ea863c5af575bee4f04f1f6a079192) by 2581-1 (#1489) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>