feat: add CD configuration (#3) #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CD" | |
# Only triggers when there's a tag push. | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
env: | |
CARGO_TERM_COLOR: always | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
publish: | |
name: "Publish library to crates.io" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Clones the repository" | |
uses: actions/checkout@v3 | |
- name: "Setup Rust toolchain" | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: "Publish to crates.io" | |
uses: katyo/publish-crates@v1 | |
with: | |
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
ignore-unpublished-changes: true |