From eb0d68308648233d1e0bcdc702d62d8c14d3d70f Mon Sep 17 00:00:00 2001 From: Vince Grassia <593223+vgrassia@users.noreply.github.com> Date: Tue, 1 Oct 2024 04:31:49 -0400 Subject: [PATCH] Release @bitwarden/sdk-napi workflow - Fix logic (#1104) --- .github/workflows/release-napi.yml | 35 +++++++++++++++--------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release-napi.yml b/.github/workflows/release-napi.yml index e8be69f99..761515c73 100644 --- a/.github/workflows/release-napi.yml +++ b/.github/workflows/release-napi.yml @@ -14,11 +14,6 @@ on: - Initial Release - Redeploy - Dry Run - npm_publish: - description: "Publish to NPM registry" - required: true - default: true - type: boolean defaults: run: @@ -63,17 +58,23 @@ jobs: uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Download artifacts - uses: bitwarden/gh-actions/download-artifacts@main + uses: dawidd6/action-download-artifact@bf251b5aa9c2f7eeb574a96ee720e24f801b7c11 # v6 with: workflow: build-napi.yml workflow_conclusion: success branch: main - artifacts: | - sdk-bitwarden-napi-aarch64-apple-darwin - sdk-bitwarden-napi-x86_64-apple-darwin - sdk-bitwarden-napi-x86_64-pc-windows-msvc - sdk-bitwarden-napi-x86_64-unknown-linux-gnu - schemas.ts + name: sdk-bitwarden-napi-(.*)|schemas.ts + name_is_regexp: true + path: dist + + - name: Move artifact files to single directory + run: | + ls -alhR + shopt -s globstar + mv **/*.node . + mv schemas.ts/ schemas/ + mv schemas/schemas.ts . + working-directory: dist - name: Create release if: ${{ inputs.release_type != 'Dry Run' }} @@ -88,8 +89,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} draft: true artifacts: | - sdk-napi.darwin-arm64.node - sdk-napi.darwin-x64.node - sdk-napi.win32-x64-msvc.node - sdk-napi.linux-x64-gnu.node - schemas.ts + dist/sdk-napi.darwin-arm64.node + dist/sdk-napi.darwin-x64.node + dist/sdk-napi.win32-x64-msvc.node + dist/sdk-napi.linux-x64-gnu.node + dist/schemas.ts