-
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 1.57 KB
/
rust.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: Rust
env:
CARGO_TERM_COLOR: always
on:
pull_request:
branches: [ "main", "master", "prod" ]
tags: [ "prod-*", "v*.*.*" ]
push:
branches: [ "main", "master", "prod" ]
tags: [ "prod-*", "v*.*.*" ]
release:
types: [ published ]
schedule:
- cron: "30 9 * * *"
workflow_dispatch:
inputs:
publish:
default: true
description: 'Publish'
required: true
type: boolean
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- nightly
steps:
- uses: actions/checkout@v3
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --release -v --workspace
- run: cargo test --all -F full --release -v
features:
if: ${{ github.event.inputs.publish }}
name: Publish
needs: [ build ]
runs-on: ubuntu-latest
strategy:
matrix:
package:
- acme-core
- acme-derive
- acme-macros
- acme-net
- acme-wasm
steps:
- uses: actions/checkout@v3
- name: Publish (${{matrix.package}})
run: cargo publish --all-features -v -p ${{ matrix.package }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
publish:
if: ${{ github.event.inputs.publish }}
name: Publish
needs: features
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Publish (acme)
run: cargo publish --all-features -v -p acme --token ${{ secrets.CARGO_REGISTRY_TOKEN }}