-
Notifications
You must be signed in to change notification settings - Fork 31
34 lines (31 loc) · 985 Bytes
/
release.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
# Attempts to perform a release when a particular tag is pushed.
# This assumes that the CRATES_TOKEN secret has been set and contains
# a crates.io API token with which we can publish our crates to crates.io.
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # e.g. v0.26.0, v1.0.0
- "v[0-9]+.[0-9]+.[0-9]+-pre.[0-9]+" # e.g. v0.26.0-pre.1
jobs:
create-release:
name: Create GitHub release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: taiki-e/create-gh-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Publish crate
run: |
cargo publish --token ${{ secrets.CRATES_TOKEN }}