-
Notifications
You must be signed in to change notification settings - Fork 50
98 lines (81 loc) · 3.15 KB
/
generate_schemas.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa # 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