Skip to content

Commit

Permalink
Merge branch 'main' into bws-docker-image
Browse files Browse the repository at this point in the history
  • Loading branch information
tangowithfoxtrot authored Jan 11, 2024
2 parents e0870a6 + b385d2d commit ff39b87
Show file tree
Hide file tree
Showing 330 changed files with 14,367 additions and 6,516 deletions.
6 changes: 1 addition & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@

- **file.ext:** Description of what was changed and why

## Screenshots

<!--Required for any UI changes. Delete if not applicable-->

## Before you submit

- Please add **unit tests** where it makes sense to do so (encouraged but not required)
- Please add **unit tests** where it makes sense to do so
3 changes: 3 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore:
- "crates/sdk-schemas" # Tool
- "crates/uniffi-bindgen" # Tool
31 changes: 7 additions & 24 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,31 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"schedule:weekends",
":combinePatchMinorReleases",
":dependencyDashboard",
":maintainLockFilesWeekly",
":prConcurrentLimit10",
":rebaseStalePrs",
":separateMajorReleases"
":separateMajorReleases",
"group:monorepos",
"schedule:weekends"
],
"separateMajorMinor": true,
"enabledManagers": ["cargo", "github-actions", "npm", "nuget"],
"commitMessagePrefix": "[deps]:",
"commitMessageTopic": "{{depName}}",
"packageRules": [
{
"groupName": "npm minor",
"matchManagers": ["npm"],
"matchUpdateTypes": ["minor", "patch"]
},
{
"matchManagers": ["cargo"],
"matchUpdateTypes": ["patch"],
"enabled": false
},
{
"matchManagers": ["cargo"],
"matchUpdateTypes": ["minor"],
"matchCurrentVersion": ">=1.0.0",
"enabled": false
},
{
"matchManagers": ["cargo"],
"matchPackagePatterns": ["pyo3*"],
"matchUpdateTypes": ["minor", "patch"],
"groupName": "pyo3 non-major"
},
{
"groupName": "nuget minor",
"matchManagers": ["nuget"],
"matchUpdateTypes": ["minor", "patch"]
},
{
"groupName": "gh minor",
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["minor", "patch"]
}
]
],
"ignoreDeps": ["dotnet-sdk"]
}
16 changes: 8 additions & 8 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
push:
branches:
- "master"
- "main"
workflow_dispatch:

defaults:
Expand All @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install rust
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # stable
with:
toolchain: 1.67.0 # https://github.com/cross-rs/cross/issues/1222

Expand All @@ -38,15 +38,15 @@ jobs:
key: ${{ matrix.settings.target }}-cargo

- name: Install Cross
run: cargo install cross
run: cargo install cross --locked

- name: Build
env:
TARGET: ${{ matrix.settings.target }}
run: cross build -p bitwarden-uniffi --release --target=${{ matrix.settings.target }}

- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: android-${{ matrix.settings.target }}
path: ./target/${{ matrix.settings.target }}/release/libbitwarden_uniffi.so
Expand All @@ -70,7 +70,7 @@ jobs:
fetch-depth: 0

- name: Install rust
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # stable
with:
toolchain: stable

Expand All @@ -80,13 +80,13 @@ jobs:
key: cargo-combine-cache

- name: Setup Java
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
distribution: temurin
java-version: 17

- name: Download Artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0

- name: Move artifacts
working-directory: languages/kotlin/sdk/src/main/jniLibs
Expand All @@ -102,7 +102,7 @@ jobs:
run: ./build-schemas.sh

- name: Publish
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1
with:
arguments: sdk:publish
build-root-directory: languages/kotlin
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
push:
branches:
- "master"
- "main"
- "rc"
- "hotfix-rc"
workflow_dispatch:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install rust
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # stable
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
Expand All @@ -75,7 +75,7 @@ jobs:

- name: Install Cross (aarch64-unknown-linux-gnu)
if: ${{ matrix.settings.target == 'aarch64-unknown-linux-gnu' }}
run: cargo install cross
run: cargo install cross --locked

- name: Build
if: ${{ matrix.settings.target != 'aarch64-unknown-linux-gnu' }}
Expand All @@ -99,7 +99,7 @@ jobs:
run: zip -j ./bws-${{ matrix.settings.target }}-${{ env._PACKAGE_VERSION }}.zip ./target/${{ matrix.settings.target }}/release/bws

- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: bws-${{ matrix.settings.target }}-${{ env._PACKAGE_VERSION }}.zip
path: ./bws-${{ matrix.settings.target }}-${{ env._PACKAGE_VERSION }}.zip
Expand All @@ -118,12 +118,12 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Download x86_64-apple-darwin artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: bws-x86_64-apple-darwin-${{ env._PACKAGE_VERSION }}.zip

- name: Download aarch64-apple-darwin artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: bws-aarch64-apple-darwin-${{ env._PACKAGE_VERSION }}.zip

Expand All @@ -142,7 +142,7 @@ jobs:
run: zip ./bws-macos-universal-${{ env._PACKAGE_VERSION }}.zip ./bws-macos-universal/bws

- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: bws-macos-universal-${{ env._PACKAGE_VERSION }}.zip
path: ./bws-macos-universal-${{ env._PACKAGE_VERSION }}.zip
Expand All @@ -158,7 +158,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install rust
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # stable
with:
toolchain: stable

Expand All @@ -177,7 +177,7 @@ jobs:
sed -i.bak 's/\$NAME\$/Bitwarden Secrets Manager CLI/g' THIRDPARTY.html
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: THIRDPARTY.html
path: ./crates/bws/THIRDPARTY.html
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build-dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build .NET SDK

on:
pull_request:
push:
branches:
- master
- main

jobs:
generate_schemas:
Expand All @@ -24,36 +24,36 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Download C# schemas artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: schemas.cs
path: languages/csharp/Bitwarden.Sdk

- name: Set up .NET Core
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
global-json-file: languages/csharp/global.json

- name: Download x86_64-apple-darwin files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-x86_64-apple-darwin
path: languages/csharp/Bitwarden.Sdk/macos-x64

- name: Download aarch64-apple-darwin files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-aarch64-apple-darwin
path: languages/csharp/Bitwarden.Sdk/macos-arm64

- name: Download x86_64-unknown-linux-gnu files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-x86_64-unknown-linux-gnu
path: languages/csharp/Bitwarden.Sdk/ubuntu-x64

- name: Download x86_64-pc-windows-msvc files
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-x86_64-pc-windows-msvc
path: languages/csharp/Bitwarden.Sdk/windows-x64
Expand All @@ -71,7 +71,7 @@ jobs:
working-directory: languages/csharp/Bitwarden.Sdk

- name: Upload NuGet package
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: Bitwarden.Sdk.0.0.1.nupkg
path: |
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/build-java.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build Java SDK

on:
push:
branches:
- main

jobs:
generate_schemas:
uses: ./.github/workflows/generate_schemas.yml

build_rust:
uses: ./.github/workflows/build-rust-cross-platform.yml

build_java:
name: Build Java
runs-on: ubuntu-22.04
needs:
- generate_schemas
- build_rust

steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Download Java schemas artifact
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: sdk-schemas-java
path: languages/java/src/main/java/bit/sdk/schema/

- name: Setup Java
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
distribution: temurin
java-version: 17

- name: Download x86_64-apple-darwin files
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-x86_64-apple-darwin
path: languages/java/src/main/resources/darwin-x64

- name: Download aarch64-apple-darwin files
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-aarch64-apple-darwin
path: languages/java/src/main/resources/darwin-aarch64

- name: Download x86_64-unknown-linux-gnu files
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-x86_64-unknown-linux-gnu
path: languages/java/src/main/resources/ubuntu-x64

- name: Download x86_64-pc-windows-msvc files
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: libbitwarden_c_files-x86_64-pc-windows-msvc
path: languages/java/src/main/resources/windows-x64

- name: Publish Maven
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1
with:
arguments: publish
build-root-directory: languages/java
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/build-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
push:
branches:
- "master"
- "main"
- "rc"
- "hotfix-rc"
workflow_dispatch:
Expand Down Expand Up @@ -54,14 +54,14 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 18
cache: "npm"
cache-dependency-path: crates/bitwarden-napi/package-lock.json

- name: Install rust
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # stable
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
Expand All @@ -72,7 +72,7 @@ jobs:
key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }}

- name: Retrieve schemas
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
with:
name: schemas.ts
path: ${{ github.workspace }}/crates/bitwarden-napi/src-ts/bitwarden_client/
Expand All @@ -84,7 +84,7 @@ jobs:
run: ${{ matrix.settings.build }}

- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: sdk-bitwarden-napi-${{ matrix.settings.target }}
path: ${{ github.workspace }}/crates/bitwarden-napi/sdk-napi.*.node
Expand Down
Loading

0 comments on commit ff39b87

Please sign in to comment.