-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main not master
- Loading branch information
Showing
5 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
feature: ['feat/*', 'feature/*'] | ||
chore: ['chore/*'] | ||
bug: ['fix/*', 'bug/*'] | ||
build: ['build/*'] | ||
ci: ['ci/*'] | ||
docs: ['docs/*'] | ||
style: ['style/*'] | ||
refactor: ['refactor/*'] | ||
perf: ['perf/*'] | ||
test: ['test/*'] | ||
revert: ['revert/*'] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name-template: "$RESOLVED_VERSION" | ||
tag-template: "$RESOLVED_VERSION" | ||
categories: | ||
- title: "✨ Features" | ||
labels: | ||
- "feature" | ||
- "enhancement" | ||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- "fix" | ||
- "bugfix" | ||
- "bug" | ||
- title: "🧰 Maintenance" | ||
label: | ||
- "chore" | ||
- "dependencies" | ||
- title: "📝 Documentation" | ||
label: "docs" | ||
exclude-labels: | ||
- "skip-changelog" | ||
change-template: "- $TITLE @$AUTHOR (#$NUMBER)" | ||
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks. | ||
version-resolver: | ||
major: | ||
labels: | ||
- "major" | ||
minor: | ||
labels: | ||
- "minor" | ||
patch: | ||
labels: | ||
- "patch" | ||
default: patch | ||
template: | | ||
$CHANGES |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
RUSTFLAGS: -Dwarnings | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
draft-release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag_name: ${{ steps.release_drafter.outputs.tag_name }} | ||
steps: | ||
- uses: release-drafter/release-drafter@v5 | ||
id: release_drafter | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
rust: [stable, nightly] | ||
runs-on: | ||
- windows-2019 | ||
- windows-2022 | ||
runs-on: ${{ matrix.runs-on }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
~/.cargo/.package-cache | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Setup toolchain | ||
run: | | ||
rustup update --no-self-update ${{ matrix.rust }} | ||
rustup default ${{ matrix.rust }} | ||
rustup component add clippy | ||
- name: Run cargo static analysis checks | ||
run: | | ||
cargo check | ||
cargo clippy -- -D clippy::all | ||
cargo test | ||
- name: Build crate | ||
run: | | ||
cargo publish --dry-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Publish crate | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Update toolchain | ||
run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }} && rustup component add clippy | ||
- name: Run cargo static analysis checks | ||
run: | | ||
cargo check | ||
cargo clippy --all-targets --all-features -- -D clippy::all | ||
cargo test | ||
- name: Setup toolchain | ||
run: | | ||
rustup update --no-self-update ${{ matrix.rust }} | ||
rustup default ${{ matrix.rust }} | ||
rustup component add clippy | ||
rustup target add aarch64-pc-windows-msvc i686-pc-windows-msvc x86_64-pc-windows-msvc | ||
- name: Sanity check tag equals crate version | ||
run: | | ||
pkg_version=$(awk -F ' = ' '$1 ~ /version/ { gsub(/[\"]/, "", $2); printf("%s",$2); exit; }' Cargo.toml) | ||
if [[ "${{ github.ref }}" -eq "$pkg_version" ]]; then | ||
echo "Github ref ${{ github.ref }} equals from parsed package version $pkg_version. Continuing..." | ||
else | ||
echo "Github ref ${{ github.ref }} differs from parsed package version $pkg_version! Aborting..." | ||
exit 1 | ||
fi | ||
- name: Publish to crates.io | ||
run: | | ||
cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
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