27 lines
668 B
YAML
27 lines
668 B
YAML
|
name: CD
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
tags:
|
||
|
- v[0-9]+.[0-9]+.[0-9]+
|
||
|
|
||
|
jobs:
|
||
|
release:
|
||
|
if: startsWith(github.ref, 'refs/tags/')
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: dtolnay/rust-toolchain@stable
|
||
|
- name: Create Release 🖋
|
||
|
uses: softprops/action-gh-release@v1
|
||
|
with:
|
||
|
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'pre') }}
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
||
|
|
||
|
- name: Publish to crates.io 🚀
|
||
|
uses: katyo/publish-crates@v2
|
||
|
with:
|
||
|
token: ${{ secrets.PAT }}
|
||
|
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|