Skip to content

Commit

Permalink
Merge branch 'main' into BRE-224-Create-a-GitHub-Release-workflows-fo…
Browse files Browse the repository at this point in the history
…r-SDK
  • Loading branch information
michalchecinski authored Sep 27, 2024
2 parents f71be46 + 42b536a commit 5c558e5
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 16 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build-java.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
name: Build Java SDK

on:
push:
branches:
- main
- rc
- hotfix-rc
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -66,3 +65,24 @@ jobs:
- name: Build Maven
run: ./gradlew build
working-directory: languages/java

- name: Upload Java SDK Build
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: build
path: ${{ github.workspace }}/languages/java/build
if-no-files-found: error

- name: Upload Java SDK Build
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: resources
path: ${{ github.workspace }}/languages/java/src/main/resources
if-no-files-found: error

- name: Upload Java SDK Build
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: schemas
path: languages/java/src/main/java/bit/sdk/schema
if-no-files-found: error
30 changes: 30 additions & 0 deletions .github/workflows/publish-java.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Publish Java SDK
run-name: Publish Java SDK ${{ inputs.release_type }}

Expand All @@ -17,6 +18,11 @@ on:
required: false
default: "latest"

defaults:
run:
shell: bash
working-directory: languages/java

env:
_KEY_VAULT: "bitwarden-ci"

Expand Down Expand Up @@ -89,6 +95,30 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0

- name: Download Java SDK Build
uses: bitwarden/gh-actions/download-artifacts@main
with:
workflow: build-java.yml
workflow_conclusion: success
artifacts: build
path: languages/java/build

- name: Download Java Resources
uses: bitwarden/gh-actions/download-artifacts@main
with:
workflow: build-java.yml
workflow_conclusion: success
artifacts: resources
path: languages/java/src/main/resources

- name: Download Java Resources
uses: bitwarden/gh-actions/download-artifacts@main
with:
workflow: build-java.yml
workflow_conclusion: success
artifacts: schemas
path: languages/java/src/main/java/bit/sdk/schema

- name: Publish package to GitHub Packages
if: ${{ inputs.release_type != 'Dry Run' }}
run: ./gradlew publish
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ To build, you will need the following in your PATH:
- We recommend installing this via the
[Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022)

## Documentation

Please refer to our [Contributing Docs](https://contributing.bitwarden.com/) for
[getting started](https://contributing.bitwarden.com/getting-started/sdk/) instructions and
[architectural documentation](https://contributing.bitwarden.com/architecture/sdk/).

You can also browse the latest published documentation:

- [docs.rs](https://docs.rs/bitwarden/latest/bitwarden/) for the public SDK.
- Or for developers of the SDK, view the internal
[API documentation](https://sdk-api-docs.bitwarden.com/bitwarden/index.html) which includes
private items.

## Crates

The project is structured as a monorepo using cargo workspaces. Some of the more noteworthy crates
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-napi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bitwarden-napi"
version = "0.3.1"
version = "1.0.0"
description = """
N-API bindings for the Bitwarden Secrets Manager SDK
"""
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-napi/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitwarden/sdk-napi-darwin-arm64",
"version": "0.3.1",
"version": "1.0.0",
"homepage": "https://github.com/bitwarden/sdk#readme",
"bugs": {
"url": "https://github.com/bitwarden/sdk/issues"
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-napi/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitwarden/sdk-napi-darwin-x64",
"version": "0.3.1",
"version": "1.0.0",
"homepage": "https://github.com/bitwarden/sdk#readme",
"bugs": {
"url": "https://github.com/bitwarden/sdk/issues"
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-napi/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitwarden/sdk-napi-linux-x64-gnu",
"version": "0.3.1",
"version": "1.0.0",
"homepage": "https://github.com/bitwarden/sdk#readme",
"bugs": {
"url": "https://github.com/bitwarden/sdk/issues"
Expand Down
2 changes: 1 addition & 1 deletion crates/bitwarden-napi/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitwarden/sdk-napi-win32-x64-msvc",
"version": "0.3.1",
"version": "1.0.0",
"homepage": "https://github.com/bitwarden/sdk#readme",
"bugs": {
"url": "https://github.com/bitwarden/sdk/issues"
Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-napi/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/bitwarden-napi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitwarden/sdk-napi",
"version": "0.3.1",
"version": "1.0.0",
"homepage": "https://github.com/bitwarden/sdk#readme",
"bugs": {
"url": "https://github.com/bitwarden/sdk/issues"
Expand Down
2 changes: 1 addition & 1 deletion languages/go/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
2 changes: 1 addition & 1 deletion languages/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repositories {
def branchName = "git branch --show-current".execute().text.trim()

if (branchName == "main" || branchName == "rc" || branchName == "hotfix-rc") {
version = "0.1.0"
version = "1.0.0"
} else {
// branchName-SNAPSHOT
version = "${branchName.replaceAll('/', '-')}-SNAPSHOT"
Expand Down
2 changes: 1 addition & 1 deletion languages/php/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"keywords": ["bitwarden","sdk","password-manager"],
"homepage": "https://github.com/bitwarden/sdk",
"version": "0.1.0",
"version": "1.0.0",
"require": {
"php": "^8.0",
"ext-ffi": "*"
Expand Down
2 changes: 1 addition & 1 deletion languages/python/bitwarden_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""The official Bitwarden client library for Python."""

__version__ = "0.1.1"
__version__ = "1.0.0"

from .bitwarden_client import *
from .schemas import *
Expand Down
2 changes: 1 addition & 1 deletion languages/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description = "A Bitwarden Client for python"
name = "bitwarden_sdk"
readme = "README.md"
requires-python = ">=3.0"
version = "0.1.1"
version = "1.0.0"

[tool.maturin]
bindings = "pyo3"
Expand Down

0 comments on commit 5c558e5

Please sign in to comment.