Skip to content

feat(attr_parse): Add FieldWithOpts utility struct #102

feat(attr_parse): Add FieldWithOpts utility struct

feat(attr_parse): Add FieldWithOpts utility struct #102

Workflow file for this run

name: CI
on:
push:
tags:
- v*
branches:
- master
paths-ignore:
- .github/CODE_OF_CONDUCT.md
- .github/CODEOWNERS
- .github/dependabot.yml
- .github/FUNDING.yml
- LICENSE
- .gitignore
pull_request:
paths-ignore:
- .github/CODE_OF_CONDUCT.md
- .github/CODEOWNERS
- .github/dependabot.yml
- .github/FUNDING.yml
- LICENSE
- .gitignore
permissions:
contents: read
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: --deny warnings
jobs:
changelog:
name: Changelog
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.log.outputs.changelog }}
steps:
- uses: actions/checkout@v4
name: Checkout
with:
fetch-depth: 0
fetch-tags: true
- name: Conditional args
id: args
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: >
echo "before=${{ github.ref_name }}" >> $GITHUB_OUTPUT &&
echo "until=${{ github.ref_name }}" >> $GITHUB_OUTPUT
- name: Get last tag
id: last-tag
uses: alorel-actions/semantic-release-lite/last-tag@v0
with:
before: ${{ steps.args.outputs.before }}
- name: Generate changelog
id: log
uses: alorel-actions/semantic-release-lite/generate-changelog@v0
with:
last-tag: ${{ steps.last-tag.outputs.last-tag }}
from: ${{ steps.last-tag.outputs.last-tag }}
until: ${{ steps.args.outputs.until || github.sha }}
stay-at-zero: true
minor-types: |
feat: Features
patch-types: |
fix: Bug Fixes
perf: Performance
trivial-types: |
chore: Maintenance
deps: Dependency updates
ci: CI & Build
build: CI & Build
refactor: Refactors
docs: Documentation
lint:
name: Lint
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init toolchain
uses: alorel-actions/cargo/init@v1
with:
cache-prefix: lint
toolchain: nightly
components: rustfmt,clippy
local: true
- name: Fmt
run: cargo fmt --check
- name: Clippy
run: cargo clippy --workspace --tests --no-deps --all-features --examples
- name: cargo-rdme
uses: alorel-actions/cargo/rdme@v1
test:
name: Test / ${{matrix.toolchain}}
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
strategy:
fail-fast: false
matrix:
toolchain:
- nightly
- stable
- 1.60.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init toolchain
uses: alorel-actions/cargo/init@v1
with:
cache-prefix: test
toolchain: ${{matrix.toolchain}}
local: true
# Test
- name: Test (default)
run: cargo test --workspace --locked
- name: Test (attr_parse)
run: cargo test --workspace --locked --features attr_parse
- name: Test (attr_parse,full)
run: cargo test --workspace --locked --features attr_parse,full
- name: Test (all)
if: ${{ matrix.toolchain == 'nightly' }}
run: cargo test --workspace --locked --all-features
- name: Test (none)
run: cargo test --workspace --locked --no-default-features
# Examples
- name: Examples (all)
if: ${{ matrix.toolchain == 'nightly' }}
run: cargo test --examples --all-features --locked
- name: Examples (attr_parse,full)
run: cargo test --examples --locked --features attr_parse,full
release-notes:
name: Update release notes
runs-on: ubuntu-latest
needs:
- changelog
if: ${{ startsWith(github.ref, 'refs/tags/') }}
permissions:
contents: write
steps:
- name: Publish changelog
uses: ncipollo/release-action@v1
with:
allowUpdates: false
prerelease: false
generateReleaseNotes: false
body: ${{ needs.changelog.outputs.changelog }}
tag: ${{ github.ref_name }}