Skip to content

Commit

Permalink
docs: document release process
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorias committed Oct 10, 2023
1 parent b95c012 commit 2dc0dc8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ env:
# complains about missing BLAS.
CIBW_SKIP: "*musllinux* pp310*"
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install build
run: python -m pip install build==1.0.3
- name: Build sdist
run: python -m build --sdist
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.tar.gz

build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
23 changes: 10 additions & 13 deletions DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ lefthook install
pipenv install --dev
```

## Building
## Local Build

This section explains how to build
[a wheel](https://realpython.com/python-wheels/) of this package.
[a wheel](https://realpython.com/python-wheels/) of this package on your local
machine.

1. Run

Expand All @@ -28,19 +29,15 @@ python -m build --wheel

This builds a wheel file and saves it in `dist/`.

## How to Upload to PyPI
## Build, Release & Publish

1. [Run `build_ext`](https://stackoverflow.com/a/4515279/915552)
This section explains how to create a release (build sdist and wheel files of a
version) and publish to GitHub and PyPI.

python setup.py build_ext

2. [Build a wheel](https://packaging.python.org/guides/distributing-packages-using-setuptools/#pure-python-wheels)

python setup.py sdist

3. [Upload](https://packaging.python.org/guides/distributing-packages-using-setuptools/#uploading-your-project-to-pypi)

twine upload dist/pycodec2.*tar.gz
1. Run the build GitHub action.
2. Fetch the built artifacts and unpack.
3. Run `twine upload ARTIFACTS`.
4. Run `gh release create VERSION`.

## ADRs

Expand Down

0 comments on commit 2dc0dc8

Please sign in to comment.