Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

permissions:
contents: write

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install build tool
run: pip install build

- name: Build sdist and wheel
run: python -m build

- name: Determine prerelease flag
id: prerelease
run: |
TAG="${GITHUB_REF_NAME}"
if [[ "$TAG" =~ (a|b|rc)[0-9]+$ ]]; then
echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
else
echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
prerelease: ${{ steps.prerelease.outputs.is_prerelease }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -333,5 +333,10 @@ __pycache__/
*bore.zip
*bore_bin

# Build artifacts
dist/
build/
*.egg-info/

# minichain data dir
.minichain/
37 changes: 37 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "minichain"
version = "0.1.0-beta"
description = "MiniChain — a minimal proof-of-work blockchain node"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
dependencies = [
"pynacl==1.6.2",
"trie>=3.1.0",
"libp2p",
"aiohttp>=3.10.11",
"multiaddr",
]

[project.optional-dependencies]
test = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=4.0.0",
]

[project.scripts]
minichain = "main:main"

[project.urls]
Homepage = "https://github.com/StabilityNexus/MiniChain"

[tool.setuptools]
py-modules = ["main"]

[tool.setuptools.packages.find]
include = ["minichain*"]
Loading