Skip to content

Commit

Permalink
CI: automate release publishing on tag creation
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Apr 27, 2023
1 parent 24e066c commit 0e5808d
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 15 deletions.
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

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
cache: pip
- name: Install build dependencies
run: |
python -m pip install -U pip
python -m pip install -e '.[dev]'
- name: Build
run: python -m build
- name: Check
run: twine check --strict dist/*
- name: What will we publish?
run: ls -l dist
- name: Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip_existing: true
print_hash: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ See Git checking messages for full history.

## 9.0.2 (2023/xx/xx)
- level up the packaging using `hatchling`
- CI: automated release publishing on tag creation
- :heart: contributors: @

## 9.0.1 (2023/04/20)
Expand Down
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,3 @@ Or you can install it with conda:
```shell
conda install -c conda-forge python-mss
```

## Maintenance

For the maintainers, here are commands to upload a new release:

```shell
rm -rf build dist
python -m build
twine check dist/*
twine upload dist/*
```
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

sys.path.insert(0, str(Path(__file__).parent.parent.parent / "src"))

from mss import __version__ # noqa
from mss import __author__, __date__, __version__ # noqa

# -- General configuration ------------------------------------------------

Expand All @@ -29,7 +29,7 @@

# General information about the project.
project = "Python MSS"
copyright = "2013-2023, Mickaël 'Tiger-222' Schoentgen & contributors"
copyright = f"{__date__}, {__author__} & contributors"
author = "Tiger-222"

# The version info for the project you're documenting, acts as replacement for
Expand Down
5 changes: 3 additions & 2 deletions src/mss/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@

__version__ = "9.0.2"
__author__ = "Mickaël 'Tiger-222' Schoentgen"
__copyright__ = """
Copyright (c) 2013-2023, Mickaël 'Tiger-222' Schoentgen
__date__ = "2013-2023"
__copyright__ = f"""
Copyright (c) {__date__}, {__author__}
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee or royalty is hereby
Expand Down

0 comments on commit 0e5808d

Please sign in to comment.