Skip to content

BRE-367 - Update regex in Publish Java workflow (#1143) #439

BRE-367 - Update regex in Publish Java workflow (#1143)

BRE-367 - Update regex in Publish Java workflow (#1143) #439

name: Generate schemas
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
- rc
- hotfix-rc
env:
CARGO_TERM_COLOR: always
jobs:
schemas:
name: Generate schemas
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable
- name: Set up Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
cache: "npm"
cache-dependency-path: "package-lock.json"
node-version: "16"
- name: NPM setup
run: npm ci
- name: Cache cargo registry
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- name: NPM Schemas
run: npm run schemas
- name: Upload ts schemas artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.ts
path: ${{ github.workspace }}/languages/js/sdk-client/src/schemas.ts
if-no-files-found: error
- name: Upload c# schemas artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.cs
path: ${{ github.workspace }}/languages/csharp/Bitwarden.Sdk/schemas.cs
if-no-files-found: error
- name: Upload python schemas artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: 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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.rb
path: ${{ github.workspace }}/languages/ruby/bitwarden_sdk_secrets/lib/schemas.rb
if-no-files-found: error
- name: Upload json schemas artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sdk-schemas-json
path: ${{ github.workspace }}/support/schemas/*
if-no-files-found: error
- name: Upload Go schemas artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: schemas.go
path: ${{ github.workspace }}/languages/go/schema.go
- name: Upload java schemas artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sdk-schemas-java
path: ${{ github.workspace }}/languages/java/src/main/java/com/bitwarden/sdk/schema/*
if-no-files-found: error
- name: Upload cpp schemas artifact
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: sdk-schemas-cpp
path: ${{ github.workspace }}/languages/cpp/include/schemas.hpp
if-no-files-found: error