-
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/pm-3435-passphrase-generator
- Loading branch information
Showing
199 changed files
with
8,252 additions
and
1,111 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: Build .NET SDK | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
|
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,68 @@ | ||
name: Build Java SDK | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
- name: Download Java schemas artifact | ||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | ||
with: | ||
name: sdk-schemas-java | ||
path: languages/java/src/main/java/bit/sdk/schema/ | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
- 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/java/src/main/resources/darwin-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/java/src/main/resources/darwin-aarch64 | ||
|
||
- 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/java/src/main/resources/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/java/src/main/resources/windows-x64 | ||
|
||
- name: Publish Maven | ||
uses: gradle/gradle-build-action@b5126f31dbc19dd434c3269bf8c28c315e121da2 # v2.8.1 | ||
with: | ||
arguments: publish | ||
build-root-directory: languages/java | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,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@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.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@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.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 }} |
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,75 @@ | ||
name: Publish PHP SDK | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build_rust: | ||
uses: ./.github/workflows/build-rust-cross-platform.yml | ||
|
||
setup_php: | ||
name: Setup PHP | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- build_rust | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
|
||
- name: Setup PHP with PECL extension | ||
uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # 2.26.0 | ||
with: | ||
php-version: "8.0" | ||
tools: composer | ||
extensions: ext-ffi | ||
|
||
- name: Composer check | ||
run: | | ||
composer install | ||
composer validate | ||
working-directory: languages/php/ | ||
|
||
- 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: temp/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: temp/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: temp/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: temp/windows-x64 | ||
|
||
- name: Copy lib files | ||
run: | | ||
mkdir -p languages/php/src/lib/macos-arm64 | ||
mkdir -p languages/php/src/lib/ubuntu-x64 | ||
mkdir -p languages/php/src/lib/macos-x64 | ||
mkdir -p languages/php/src/lib/windows-x64 | ||
platforms=("macos-arm64" "ubuntu-x64" "macos-x64" "windows-x64") | ||
files=("libbitwarden_c.dylib" "libbitwarden_c.so" "libbitwarden_c.dylib" "bitwarden_c.dll") | ||
for ((i=0; i<${#platforms[@]}; i++)); do | ||
cp "temp/${platforms[$i]}/${files[$i]}" "languages/php/src/lib/${platforms[$i]}/${files[$i]}" | ||
done | ||
- name: Publish version | ||
run: curl -XPOST -H'content-type:application/json' 'https://packagist.org/api/update-package?username=malirobot&apiToken=${{secrets.PACKAGIST_KEY}}' -d'{"repository":{"url":"https://packagist.org/packages/bitwarden/sdk"}}' | ||
working-directory: languages/php/ |
Oops, something went wrong.