-
Notifications
You must be signed in to change notification settings - Fork 20
48 lines (43 loc) · 1.23 KB
/
publish-crate.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
name: Publish rust crate to crates.io
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.74.0
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
on:
workflow_dispatch:
inputs:
crate:
description: Publish crate to crates.io
required: true
type: choice
default: ydb
options:
- ydb
- ydb-grpc
- ydb-grpc-helpers
version-part:
description: "Part of version to changes major.minor.patch (can select patch or minor only)"
required: true
type: choice
default: patch
options:
- patch
- minor
permissions:
contents: write
jobs:
publishCrate:
runs-on: ubuntu-20.04
env:
GIT_EMAIL: ${{ github.actor }}@users.noreply.github.com
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- name: Install fixed rust version
uses: ATiltedTree/setup-rust@v1
with:
rust-version: ${{env.RUST_VERSION}}
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.YDB_PLATFORM_BOT_TOKEN_REPO }}
- run: ./.github/scripts/version-up.sh "${{ github.event.inputs.crate }}" "${{ github.event.inputs.version-part }}" "$GIT_EMAIL"