Skip to content

Commit

Permalink
Prepare 0.1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Jun 25, 2021
1 parent 1caca8a commit 86f617b
Show file tree
Hide file tree
Showing 12 changed files with 238 additions and 12 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,71 @@ jobs:
toolchain: stable

- run: make doc crate=${{ matrix.crate }} open=no clean=yes




#############
# Releasing #
#############

release-github:
name: Release on GitHub
needs: ['clippy', 'rustfmt', 'rustdoc', 'test', 'msrv']
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Parse release version
id: release
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}

- name: Verify release version matches `syntez-core` Cargo manifest
run: >-
test "${{ steps.release.outputs.VERSION }}" \
== "$(grep -m1 'version = "' core/Cargo.toml | cut -d '"' -f2)"
- name: Verify release version matches `synthez-codegen` Cargo manifest
run: >-
test "${{ steps.release.outputs.VERSION }}" \
== "$(grep -m1 'version = "' codegen/Cargo.toml | cut -d '"' -f2)"
- name: Verify release version matches `synthez` Cargo manifest
run: >-
test "${{ steps.release.outputs.VERSION }}" \
== "$(grep -m1 'version = "' Cargo.toml | cut -d '"' -f2)"
- name: Parse CHANGELOG link
id: changelog
run: echo ::set-output
name=LINK::https://github.com/${{ github.repository }}/blob/v${{ steps.release.outputs.VERSION }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.release.outputs.VERSION }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' CHANGELOG.md)

- uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ steps.release.outputs.VERSION }}
body: |
[API docs](https://docs.rs/synthez/${{ steps.release.outputs.VERSION }})
[Changelog](${{ steps.changelog.outputs.LINK }})
prerelease: ${{ contains(steps.release.outputs.VERSION, '-') }}

release-crate:
name: Release on crates.io
needs: ['release-github']
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
strategy:
matrix:
crate:
- core
- codegen
- ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- run: cargo publish --token ${{ secrets.CRATESIO_TOKEN }}
working-directory: ./${{ matrix.crate }}
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
`synthez` changelog
===================

All user visible changes to this project will be documented in this file. This project uses [Semantic Versioning 2.0.0].




## [0.1.0] · 2021-06-25
[0.1.0]: /../../tree/v0.1.0

### Initially implemented

- `ParseAttrs` trait and derive macro for parsing `syn::Attribute`s in declarative way.
- Primitive `ToTokens` derive macro supporting only `#[to_tokens(append(<method>))]` attribute.
- `parse:attr::doc()`/`parse:attr::doc_string()` helpers for convenient parsing normalized Rust doc comments and `#[doc]` attributes.
- `Spanning` wrapper for attaching `Span` to arbitrary types.
- `Required` container for denoting `ParseAttrs` fields required to be provided.
- `IntoSpan` coercion working for both `Span` and `Spanned` types at the same time.
- `has::Attrs` trait abstracting `syn` types which contain `syn::Attribute`s.
- Extensions:
- `IdentExt` simplifying `syn::Ident` creation;
- `DataExt` simplifying `syn::Data` fields usage;
- `ParseBufferExt` providing batteries for parsing `syn::Ident` and `syn::punctuated`.





[Semantic Versioning 2.0.0]: https://semver.org
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "synthez"
version = "0.1.0-dev"
version = "0.1.0"
edition = "2018"
resolver = "2"
description = "Steroids for syn, quote and proc_macro2 crates"
Expand All @@ -15,6 +15,7 @@ categories = [
"development-tools::build-utils",
"development-tools::procedural-macro-helpers",
]
include = ["/src/", "/Cargo.toml", "/CHANGELOG.md", "/LICENSE.md", "/README.md"]

[features]
# Same as `full` feature of `syn` crate.
Expand All @@ -23,8 +24,8 @@ categories = [
full = ["synthez-core/full"]

[dependencies]
synthez-codegen = { version = "0.1.0-dev", path = "./codegen" }
synthez-core = { version = "0.1.0-dev", path = "./core" }
synthez-codegen = { version = "0.1.0", path = "./codegen" }
synthez-core = { version = "0.1.0", path = "./core" }

[workspace]
members = ["codegen", "core"]
Expand Down
56 changes: 56 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Blue Oak Model License
======================

Version 1.0.0

## Purpose

This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.

## Acceptance

In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.

## Copyright

Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.

## Notices

You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.

## Excuse

If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.

## Patent

Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.

## Reliability

No contributor can revoke this license.

## No Liability

***As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim.***
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
synthez
=======

[![Latest version](https://img.shields.io/crates/v/synthez "Latest version")](https://crates.io/crates/synthez)
[![Rust docs](https://docs.rs/synthez/badge.svg "Rust docs")](https://docs.rs/synthez)
[![CI](https://github.com/arcana-rs/synthez/workflows/CI/badge.svg?branch=master "CI")](https://github.com/arcana-rs/synthez/actions?query=workflow%3ACI+branch%3Amaster)
![Unsafe forbidden](https://img.shields.io/badge/unsafe-forbidden-success.svg "Unsafe forbidden")
[![Rust 1.52+](https://img.shields.io/badge/rustc-1.52+-lightgray.svg "Rust 1.52+")](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
[![License](https://img.shields.io/crates/l/synthez "License")](https://github.com/arcana-rs/synthez/blob/master/LICENSE.md)

[API Docs](https://docs.rs/synthez) |
[Changelog](https://github.com/arcana-rs/synthez/blob/master/CHANGELOG.md)

Steroids for [`syn`], [`quote`] and [`proc_macro2`] crates.




## Usage

See [API docs](https://docs.rs/synthez) for usage examples.




## License

This software is subject to the terms of the [Blue Oak Model License 1.0.0](https://github.com/instrumentisto/tracerr-rs/blob/master/LICENSE.md). If a copy of the [BlueOak-1.0.0](https://spdx.org/licenses/BlueOak-1.0.0.html) license was not distributed with this file, You can obtain one at <https://blueoakcouncil.org/license/1.0.0>.





[`proc_macro2`]: https://docs.rs/proc_macro2
[`quote`]: https://docs.rs/quote
[`syn`]: https://docs.rs/syn
7 changes: 4 additions & 3 deletions codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "synthez-codegen"
version = "0.1.0-dev"
version = "0.1.0"
edition = "2018"
resolver = "2"
description = "Internal codegen shim of synthez crate"
Expand All @@ -11,12 +11,13 @@ homepage = "https://github.com/arcana-rs/synthez/tree/master/codegen"
repository = "https://github.com/arcana-rs/synthez/tree/master/codegen"
readme = "README.md"
categories = ["development-tools::build-utils"]
include = ["/src/", "/Cargo.toml", "/README.md"]

[lib]
proc-macro = true

[dependencies]
synthez-core = { version = "0.1.0-dev", path = "../core" }
synthez-core = { version = "0.1.0", path = "../core" }
[dependencies.proc-macro2]
version = "1.0.4"
default-features = false
Expand All @@ -27,7 +28,7 @@ synthez-core = { version = "0.1.0-dev", path = "../core" }
features = ["parsing", "proc-macro"]

[dev-dependencies]
synthez = { version = "0.1.0-dev", path = "..", features = ["full"] }
synthez = { version = "0.1.0", path = "..", features = ["full"] }
[dev-dependencies.syn]
version = "1.0.72"
default-features = false
Expand Down
12 changes: 12 additions & 0 deletions codegen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
synthez-codegen
===============

Internal codegen shim of [`synthez`] crate.

DO NOT use it directly, use [`synthez`] crate instead.





[`synthez`]: https://docs.rs/synthez
5 changes: 3 additions & 2 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Internal codegen shim of [`synthez`] crate. Refer to its documentation for
//! details.
//! Internal codegen shim of [`synthez`] crate.
//!
//! DO NOT use it directly, use [`synthez`] crate instead.
//!
//! [`synthez`]: https://docs.rs/synthez

Expand Down
5 changes: 3 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "synthez-core"
version = "0.1.0-dev"
version = "0.1.0"
edition = "2018"
resolver = "2"
description = "Internal implementations of synthez crate"
Expand All @@ -11,6 +11,7 @@ homepage = "https://github.com/arcana-rs/synthez/tree/master/core"
repository = "https://github.com/arcana-rs/synthez/tree/master/core"
readme = "README.md"
categories = ["development-tools::procedural-macro-helpers"]
include = ["/src/", "/Cargo.toml", "/README.md"]

[features]
# Same as `full` feature of `syn` crate.
Expand All @@ -28,7 +29,7 @@ sealed = { version = "0.3", default-features = false }
features = ["clone-impls", "derive", "extra-traits", "parsing", "printing"]

[dev-dependencies]
synthez = { version = "0.1.0-dev", path = "..", features = ["full"] }
synthez = { version = "0.1.0", path = "..", features = ["full"] }

[package.metadata.docs.rs]
all-features = true
Expand Down
12 changes: 12 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
synthez-core
============

Internal implementations of [`synthez`] crate.

DO NOT use it directly, use [`synthez`] crate instead.





[`synthez`]: https://docs.rs/synthez
5 changes: 3 additions & 2 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Internal implementations of [`synthez`] crate. Refer to its documentation
//! for details.
//! Internal implementations of [`synthez`] crate.
//!
//! DO NOT use it directly, use [`synthez`] crate instead.
//!
//! [`synthez`]: https://docs.rs/synthez

Expand Down
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
//! Steroids for [`syn`], [`quote`] and [`proc_macro2`] crates.
//!
//! # Cargo features
//!
//! ### `full`
//!
//! Same as `full` feature of [`syn`] crate.
//!
//! Enables support of data structures for representing the syntax tree of all
//! valid Rust source code, including items and expressions.
//!
//! # Example of writing `proc_macro_derive`
//!
//! This is an example of how this library can be used to write a simplified
Expand Down

0 comments on commit 86f617b

Please sign in to comment.