35 lines
988 B
YAML
35 lines
988 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: Build Changelog 🏗
|
|
id: changelog
|
|
uses: mikepenz/release-changelog-builder-action@v4.0.0
|
|
with:
|
|
configuration: "./.github/config/changelog-builder-action.json"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.PAT }}
|
|
|
|
- name: Create Release 🖋
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'pre') }}
|
|
body: ${{steps.changelog.outputs.changelog}}
|
|
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 }}
|