-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (48 loc) · 1.41 KB
/
publish.yaml
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
name: publish
on:
workflow_dispatch:
inputs:
fav_derive:
description: "publish fav_derive"
type: boolean
default: false
fav_core:
description: "publish fav_core"
type: boolean
default: false
fav_utils:
description: "publish fav_utils"
type: boolean
default: false
fav_cli:
description: "publish fav_cli"
type: boolean
default: false
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install cargo components
run: rustup component add clippy
- name: Extract version
id: extract-version
run: echo "VERSION=$(grep -oP '^version = "\K[^"]+' Cargo.toml | awk '{$1=$1;print}')" >> $GITHUB_OUTPUT
- name: run tests
run: .github/scripts/test.sh
- name: login to crates.io
run: cargo login ${{ secrets.CRATESIO }}
- name: publish fav_derive
if: ${{ inputs.fav_derive }}
run: .github/scripts/publish.sh fav_derive
- name: publish fav_core
if: ${{ inputs.fav_core }}
run: .github/scripts/publish.sh fav_core
- name: publish fav_utils
if: ${{ inputs.fav_utils }}
run: .github/scripts/publish.sh fav_utils
- name: publish fav_cli
if: ${{ inputs.fav_cli }}
run: .github/scripts/publish.sh fav_cli