-
Notifications
You must be signed in to change notification settings - Fork 6
39 lines (36 loc) · 952 Bytes
/
crates-io.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
name: Crates.io
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
environment: production
# if: "startsWith(github.ref, 'refs/tags/')"
steps:
- uses: actions/checkout@v3
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install xmllint
run: |
sudo apt update
sudo apt-get install -y libxml2-utils
- name: Login to crates.io
uses: actions-rs/cargo@v1
with:
command: login
args: ${{ secrets.CRATES_TOKEN }}
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: Publish to crates.io
uses: actions-rs/cargo@v1
with:
command: publish