Skip to content

BRE-393 - Bumping macOS runner version from 12 to 14 (#1167) #449

BRE-393 - Bumping macOS runner version from 12 to 14 (#1167)

BRE-393 - Bumping macOS runner version from 12 to 14 (#1167) #449

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install rust
uses: dtolnay/rust-toolchain@7b1c307e0dcbda6122208f10795a713336a9b35a # stable
with:
toolchain: stable
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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