Skip to content

Commit

Permalink
feat: 🎉 Release!
Browse files Browse the repository at this point in the history
  • Loading branch information
ChecksumDev committed May 9, 2022
0 parents commit c51e9ca
Show file tree
Hide file tree
Showing 10 changed files with 1,082 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
25 changes: 25 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,25 @@
version: 2
updates:
# Cargo dependencies
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
assignees:
- "checksumdev"
labels:
- "dependencies"
- "cargo"
versioning-strategy: "auto"
target-branch: "main"

# GitHub Actions dependencies
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- "github-actions"
assignees:
- "checksumdev"
96 changes: 96 additions & 0 deletions .github/workflows/rust.yml
@@ -0,0 +1,96 @@
---
jobs:
release:
runs-on: ubuntu-18.04
steps:
# Checkout the repository
- uses: actions/checkout@v3

# Run conventional commits and determine if the release requires building
- id: changelog
name: Conventional Changelog Action
uses: TriPSs/conventional-changelog-action@v3
with:
git-message: "chore(release): {version}"
git-pull-method: "--ff-only"
github-token: ${{ secrets.GITHUB_TOKEN }}
preset: angular
release-count: "0"
skip-commit: "false"
skip-version-file: "false"
tag-prefix: v
version-file: Cargo.toml
version-path: package.version

# Load the rust toolchain
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

# Load any cache stored by rust-cache
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: Swatinem/rust-cache@v1

# Run cargo check (for release)
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
name: Run cargo check
uses: actions-rs/cargo@v1
with:
args: "--release"
command: check

# Run cargo build (for release)
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: actions-rs/cargo@v1
with:
args: "--release"
command: build

# Run cargo test (for release)
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: actions-rs/cargo@v1
with:
args: "--release"
command: test

# Login to crates.io
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: actions-rs/cargo@v1
with:
command: login
args: "${{ secrets.CRATES_IO_TOKEN }}"

# Publish to crates.io
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: actions-rs/cargo@v1
with:
command: publish

# Deploy the release artifacts to GitHub
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: uniqueid (release)
path: target/release/libuniqueid.rlib

# Create a release on GitHub with the release notes
- if: ${{ steps.changelog.outputs.skipped == 'false' }}
name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: target/release/libuniqueid.rlib
body: ${{ steps.changelog.outputs.clean_changelog }}
draft: false
name: ${{ steps.changelog.outputs.tag }}
prerelease: false
tag: ${{ steps.changelog.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}

name: Build and Publish
"on":
push:
branches:
- main
20 changes: 20 additions & 0 deletions .gitignore
@@ -0,0 +1,20 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb


# Added by cargo

/target
/Cargo.lock
20 changes: 20 additions & 0 deletions Cargo.toml
@@ -0,0 +1,20 @@
[package]
name = "uniqueid"
description = " Generates a unique hash/identifier for a system given a set of parameters."
homepage = "https://github.com/ChecksumDev/uniqueid"
readme = "README.md"
license = "GPL-3.0"
keywords = ["unique", "identifier", "hash", "hwid", "hardware-id"]
categories = [
"cryptography",
"authentication",
"data-structures",
"os",
"hardware-support"
]
version = "0.0.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
sha3 = "0.10"

0 comments on commit c51e9ca

Please sign in to comment.