-
Notifications
You must be signed in to change notification settings - Fork 9
29 lines (26 loc) · 1.06 KB
/
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
# Attempts to perform a release when a particular tag is pushed. This uses the
# release.sh script in the root of the repository, and assumes that the
# CRATES_TOKEN secret has been set and contains an API token with which we can
# publish our crates to crates.io.
#
# If release operation fails partway through due to a temporary error (e.g. the
# crate being published depends on the crate published just prior, but the
# prior crate isn't yet available via crates.io), one can simply rerun this
# workflow. The release.sh script aims to be an idempotent operation, skipping
# the publishing of crates that have already been published.
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v0.26.0, v1.0.0
- "v[0-9]+.[0-9]+.[0-9]+-pre.[0-9]+" # e.g. v0.26.0-pre.1
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Publish crates
run: ./release.sh
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}