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
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release Package

on:
push:
tags: ["release-*"]

permissions:
contents: read

jobs:
build_package:
name: Build Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist and wheel
run: pipx run build --sdist --wheel
- uses: actions/upload-artifact@v3
with:
path: dist

pypi-publish:
needs: [build_package]
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Improved colored diff
Download the [latest](https://github.com/jeffkaufman/icdiff/tags) `icdiff` and put it on your PATH.

Alternatively, install with packaging tools:

```
# pip
pip install icdiff
Expand All @@ -35,6 +36,7 @@ icdiff [options] left_file right_file
Show differences between files in a two column view.

### Options

```
--version show program's version number and exit
-h, --help show this help message and exit
Expand Down Expand Up @@ -146,17 +148,16 @@ pip install -r requirements-dev.txt

## Making a release

* Update ChangeLog with all the changes since the last release
* Update `__version__` in `icdiff`
* Run tests, make sure they pass
* `git commit -a -m "release ${version}"`
* `git push`
* `git tag release-${version}`
* `git push origin release-${version}`
* `./prepare-release.sh ${prev-version} ${version}`
* `python3 -m twine upload icdiff-${version}.tar.gz --user "__token__" --password "$TOKEN"`
- Update ChangeLog with all the changes since the last release
- Update `__version__` in `icdiff`
- Run tests, make sure they pass
- `git commit -a -m "release ${version}"`
- `git push`
- `git tag release-${version}`
- `git push origin release-${version}`
- A GitHub Action should be triggered due to the release tag being pushed, and will upload to PyPI.

## License

This file is derived from `difflib.HtmlDiff` which is under [license](https://www.python.org/download/releases/2.6.2/license/).
I release my changes here under the same license. This is GPL compatible.
I release my changes here under the same license. This is GPL compatible.
28 changes: 0 additions & 28 deletions prepare-release.sh

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from distutils.util import convert_path
from setuptools import setup, find_packages
from setuptools import setup
from icdiff import __version__

setup(
Expand All @@ -16,6 +15,7 @@
author_email="jeff@jefftk.com",
description="improved colored diff",
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
scripts=['git-icdiff'],
py_modules=['icdiff'],
entry_points={
Expand Down