-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (52 loc) · 1.79 KB
/
generate.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
name: Generate
on:
push:
jobs:
generate:
name: Generate Package
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Clone Google FHIR Protobufs
uses: actions/checkout@v3
with:
repository: 'google/fhir'
path: 'fhir'
- name: Move Protobufs to src
run: mv fhir/proto/google src/proto/google
- name: Install Protoc
uses: arduino/setup-protoc@v1
- name: Install Cargo Bump
run: cargo install cargo-bump
- name: Rust Build
run: cargo build
env:
CARGO_INCREMENTAL: 1
- name: Rust Test
run: cargo test
env:
CARGO_INCREMENTAL: 1
- name: Cargo Bump Version & Format
run: cargo bump patch && cargo fmt
- name: Update Repository
uses: EndBug/add-and-commit@v9
with:
author_name: Balamurali Pandranki
author_email: [email protected]
default_author: github_actor
message: 'Generated code.'
push: true
- name: Publish Crate
if: github.ref == 'refs/heads/main'
run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_INCREMENTAL: 1