Skip to content

Commit

Permalink
release v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Dec 5, 2024
1 parent a197359 commit a10dd7b
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 3 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: build

on:
push:
tags:
- v*
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
name: Build artifacts
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install Hatch
uses: pypa/hatch@install

- name: Build wheel and source distribution
run: hatch build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/*
if-no-files-found: error

publish:
name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest

permissions:
id-token: write

steps:
- name: Download Python artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: dist

- name: Push Python artifacts to PyPI
uses: pypa/[email protected]
with:
skip-existing: true
2 changes: 1 addition & 1 deletion binary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"YOBIBYTE", "YOTTABYTE",
"BinaryUnits", "DecimalUnits", "convert_units",
]
__version__ = '1.0.0'
__version__ = '1.0.1'
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -31,7 +31,7 @@ classifiers = [
Homepage = "https://github.com/ofek/binary"

[tool.hatch.version]
path = "binary/__init__.py"
source = "vcs"

[tool.hatch.build.targets.sdist]
include = [
Expand Down

0 comments on commit a10dd7b

Please sign in to comment.