-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.06 KB
/
build.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
name: Build Template
on:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
schedule:
- cron: '0 18 * * 5'
push:
branches: [ '*' ]
paths-ignore:
- "**/docs/**"
- "**.md"
jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: service-template
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v2
- uses: cargo-generate/[email protected]
with:
name: ${{ env.PROJECT_NAME }}
arguments: "--branch main --define service_description=default --define rpc_method=make"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
# we need to move the generated project to a temp folder, away from the template project
# otherwise `cargo` runs would fail
# see https://github.com/rust-lang/cargo/issues/9922
- run: |
mv $PROJECT_NAME ${{ runner.temp }}/
cd ${{ runner.temp }}/$PROJECT_NAME
cargo check