Skip to content

Commit

Permalink
Merge branch 'main' into ps/improved-clientsettings-parse
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-garcia committed Dec 13, 2023
2 parents 2c7ce48 + 92f19dc commit 2ee62a7
Show file tree
Hide file tree
Showing 247 changed files with 8,712 additions and 5,175 deletions.
8 changes: 4 additions & 4 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 Down Expand Up @@ -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,7 +80,7 @@ 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
Expand Down
6 changes: 3 additions & 3 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 Down Expand Up @@ -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 Down
6 changes: 3 additions & 3 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 @@ -30,7 +30,7 @@ jobs:
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

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-java.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Build Java SDK

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

jobs:
generate_schemas:
Expand All @@ -21,7 +21,7 @@ jobs:

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

- name: Download Java schemas artifact
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
Expand All @@ -30,7 +30,7 @@ jobs:
path: languages/java/src/main/java/bit/sdk/schema/

- 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
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
path: languages/java/src/main/resources/windows-x64

- name: Publish Maven
uses: gradle/gradle-build-action@b5126f31dbc19dd434c3269bf8c28c315e121da2 # v2.8.1
uses: gradle/gradle-build-action@87a9a15658c426a54dd469d4fc7dc1a73ca9d4a6 # v2.10.0
with:
arguments: publish
build-root-directory: languages/java
Expand Down
4 changes: 2 additions & 2 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 @@ -61,7 +61,7 @@ jobs:
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 Down
8 changes: 4 additions & 4 deletions .github/workflows/build-rust-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
push:
branches:
- "master"
- "main"
- "rc"
- "hotfix-rc"

Expand Down Expand Up @@ -37,7 +37,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 @@ -59,15 +59,15 @@ jobs:
release-dry-run:
name: Release dry-run
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/head/master' || github.ref == 'refs/head/rc' || github.ref == 'refs/head/hotfix-rc' }}
if: ${{ github.ref == 'refs/head/main' || github.ref == 'refs/head/rc' || github.ref == 'refs/head/hotfix-rc' }}
needs:
- build
steps:
- name: Checkout
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 Down
2 changes: 1 addition & 1 deletion .github/workflows/build-rust-cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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 Down
2 changes: 1 addition & 1 deletion .github/workflows/cloc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CLOC
on:
workflow_dispatch:
push:
branches: ["master"]
branches: ["main"]
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete-old-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
min-versions-to-keep: 25

# Ignore versions only containing version numbers
ignore-versions: '^\\d*\\.\\d*\\.\\d*(-SNAPSHOT)?$'
ignore-versions: '^\d*\.\d*\.\d*(-SNAPSHOT)?$'
4 changes: 2 additions & 2 deletions .github/workflows/direct-minimal-versions.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 @@ -39,7 +39,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: nightly
targets: ${{ matrix.settings.target }}
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/generate_schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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 @@ -40,7 +40,7 @@ jobs:
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: schemas.ts
path: ${{ github.workspace }}/languages/js_webassembly/bitwarden_client/schemas.ts
path: ${{ github.workspace }}/languages/js/sdk-client/src/schemas.ts
if-no-files-found: error

- name: Upload c# schemas artifact
Expand All @@ -54,7 +54,14 @@ jobs:
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: schemas.py
path: ${{ github.workspace }}/languages/python/BitwardenClient/schemas.py
path: ${{ github.workspace }}/languages/python/bitwarden_sdk/schemas.py
if-no-files-found: error

- name: Upload ruby schemas artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: schemas.rb
path: ${{ github.workspace }}/languages/ruby/bitwarden_sdk/lib/schemas.rb
if-no-files-found: error

- name: Upload json schemas artifact
Expand All @@ -64,6 +71,12 @@ jobs:
path: ${{ github.workspace }}/support/schemas/*
if-no-files-found: error

- name: Upload Go schemas artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: schemas.go
path: ${{ github.workspace }}/languages/go/schema.go

- name: Upload java schemas artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/golang-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Go Release

on:
workflow_dispatch:
inputs:
version_number:
description: "New Version"
required: true

env:
GO111MODULE: on
GO_VERSION: "^1.18"

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

generate-schemas:
uses: ./.github/workflows/generate_schemas.yml

build:
name: Build
needs:
- build_rust
- generate-schemas
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Go environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ env.GO_VERSION }}

- name: Cache dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

release:
name: Release
needs: build
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Go environment
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ env.GO_VERSION }}

- name: Set release version
run: echo "VERSION=${{ github.event.inputs.version_number }}" >> $GITHUB_ENV

- name: Install Goreleaser
run: go install github.com/goreleaser/[email protected]

- name: Run Goreleaser
run: goreleaser release --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ env.VERSION }}
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lint
on:
workflow_dispatch:
push:
branches: ["master"]
branches: ["main"]
pull_request:

env:
Expand All @@ -20,7 +20,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 Down Expand Up @@ -49,6 +49,6 @@ jobs:
RUSTDOCFLAGS: "-D warnings"

- name: Cargo clippy
run: cargo clippy --all-features
run: cargo clippy --all-features --tests
env:
RUSTFLAGS: "-D warnings"
2 changes: 1 addition & 1 deletion .github/workflows/publish-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
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

Expand Down
Loading

0 comments on commit 2ee62a7

Please sign in to comment.