-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ps/login-type
- Loading branch information
Showing
67 changed files
with
1,543 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Build .NET SDK | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
generate_schemas: | ||
uses: ./.github/workflows/generate_schemas.yml | ||
|
||
build_rust: | ||
uses: ./.github/workflows/build-rust-cross-platform.yml | ||
|
||
build_dotnet: | ||
name: Build .NET | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- generate_schemas | ||
- build_rust | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
- name: Download C# schemas artifact | ||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | ||
with: | ||
name: schemas.cs | ||
path: languages/csharp/Bitwarden.Sdk | ||
|
||
- name: Set up .NET Core | ||
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0 | ||
with: | ||
global-json-file: languages/csharp/global.json | ||
|
||
- name: Download x86_64-apple-darwin files | ||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | ||
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 | ||
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 | ||
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 | ||
with: | ||
name: libbitwarden_c_files-x86_64-pc-windows-msvc | ||
path: languages/csharp/Bitwarden.Sdk/windows-x64 | ||
|
||
- name: Build .NET 6 Project | ||
working-directory: languages/csharp/Bitwarden.Sdk | ||
run: | | ||
dotnet restore | ||
dotnet build --configuration Release | ||
- name: Pack NuGet Package | ||
env: | ||
VERSION: 0.0.1 | ||
run: dotnet pack --configuration Release -p:PackageID=Bitwarden.Sdk -p:Version=${VERSION} --output ./nuget-output /nologo /v:n | ||
working-directory: languages/csharp/Bitwarden.Sdk | ||
|
||
- name: Upload NuGet package | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
with: | ||
name: Bitwarden.Sdk.0.0.1.nupkg | ||
path: | | ||
./languages/csharp/Bitwarden.Sdk/nuget-output/*.nupkg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build Rust Cross Platform | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build_rust: | ||
name: Build for ${{ matrix.settings.os }} ${{ matrix.settings.target }} | ||
runs-on: ${{ matrix.settings.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
settings: | ||
- os: macos-12 | ||
target: x86_64-apple-darwin | ||
- os: macos-12 | ||
target: aarch64-apple-darwin | ||
- os: windows-2022 | ||
target: x86_64-pc-windows-msvc | ||
- os: ubuntu-22.04 | ||
target: x86_64-unknown-linux-gnu | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
- name: Install rust | ||
uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # stable | ||
with: | ||
toolchain: stable | ||
|
||
- name: Cache cargo registry | ||
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0 | ||
|
||
- name: Add build architecture | ||
run: rustup target add ${{ matrix.settings.target }} | ||
|
||
- name: Build Rust | ||
env: | ||
RUSTFLAGS: "-D warnings" | ||
run: cargo build --target ${{ matrix.settings.target }} --release | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
with: | ||
name: libbitwarden_c_files-${{ matrix.settings.target }} | ||
path: | | ||
target/${{ matrix.settings.target }}/release/*bitwarden_c* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
name: Delete old packages | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
delete: | ||
name: Cleanup Android SDK | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4.1.1 | ||
with: | ||
package-name: com.bitwarden.sdk-android | ||
package-type: maven | ||
min-versions-to-keep: 25 | ||
|
||
# Ignore versions only containing version numbers | ||
ignore-versions: '^\\d*\\.\\d*\\.\\d*$' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.