Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release @bitwarden/sdk-napi workflow - Fix logic #1104

Merged
merged 12 commits into from
Oct 1, 2024
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
Loading