Skip to content

Commit

Permalink
Release @bitwarden/sdk-napi workflow - Fix logic (#1104)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrassia authored Oct 1, 2024
1 parent 6c22e06 commit eb0d683
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/release-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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' }}
Expand All @@ -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

0 comments on commit eb0d683

Please sign in to comment.