Skip to content

chore: added manually changelog.md #221

chore: added manually changelog.md

chore: added manually changelog.md #221

Workflow file for this run

name: Build and Test for all targets
on:
push:
tags: ['v*.*.*'] # run only when a tag like v1.2.3 is pushed
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
# Generate changelog (runs once)
changelog:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
content: ${{ steps.changelog.outputs.content }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Ensure all tags are present
run: git fetch --tags --force --prune
- name: Generate changelog
uses: orhun/git-cliff-action@v4
id: changelog
with:
config: cliff.toml
# Use the latest tag vs previous tag automatically
args: --latest --strip header --output CHANGELOG.md
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REF: ${{ github.ref }}
# Test the code
test:
runs-on: ubuntu-latest
needs: changelog
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with: { cache-on-failure: true }
- name: cargo test
run: cargo test
# Build the library (single target)
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with: { cache-on-failure: true }
- name: Build release
run: cargo build --release
# Create release
release:
runs-on: ubuntu-latest
needs: [changelog, build]
permissions:
contents: write
steps:
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: ${{ needs.changelog.outputs.content }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}