Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate GitHub releases & PyPI package publication #152

Merged
merged 2 commits into from
Feb 2, 2024
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
43 changes: 43 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
tests:
name: Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -51,3 +54,43 @@ jobs:
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false


deploy:
name: Deploy
needs: [tests]
runs-on: ubuntu-latest
if: github.ref=='refs/heads/main' && github.event_name!='pull_request'

permissions:
contents: write
id-token: write

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Check release
id: check_release
run: |
python -m pip install autopub
python -m pip install https://github.com/autopub/github-release/archive/pyproject.zip
autopub check

- name: Publish
if: ${{ steps.check_release.outputs.autopub_release=='true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
autopub prepare
autopub commit
autopub build
autopub githubrelease

- name: Upload package to PyPI
if: ${{ steps.check_release.outputs.autopub_release=='true' }}
uses: pypa/gh-action-pypi-publish@release/v1
25 changes: 17 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# CHANGELOG for crispy-tailwind
CHANGELOG
=========

## Next Release (tbc)
1.0.0 - 2024-01-09
------------------

## 1.0 (2024-01-09)
* Added support for Django 5.0 (#142)
* Added support for Python 3.11 and 3.12 (#142)
* Added support for Python 3.10 (#116)
Expand All @@ -15,30 +16,37 @@
* Added docs about Tailwind CLI template discovery management command (#144)
* Fixed bug with select template and disabled property (#118)

## 0.5 (2021-04-21)
0.5.0 - 2021-04-21
------------------

* Added support for custom widgets (#92)
* Confirmed support for Django 3.2 (#91)
* Dropped support for Django 3.1 (#91)

See [Release Notes](https://github.com/django-crispy-forms/crispy-tailwind/milestone/5?closed=1)
for full change log.

## 0.4 (2021-03-22)
0.4.0 - 2021-03-22
------------------

* Fixed compatibility with django-crispy-forms 1.11.2 (#86)
* Fixed field names when using formsets (#84)

See [Release Notes](https://github.com/django-crispy-forms/crispy-tailwind/milestone/4?closed=1)
for full change log.

## 0.3 (2021-02-14)
0.3.0 - 2021-02-14
------------------

* Fixed non form errors (#77)
* Various documentation improvements
* Python 3.9 (#60) and Django 3.1 (#56) support

See [Release Notes](https://github.com/django-crispy-forms/crispy-tailwind/milestone/3?closed=1)
for full change log.

## 0.2 (2020-07-11)
0.2.0 - 2020-07-11
------------------

* Support for Formsets
* Prepended and Appended inputs
Expand All @@ -50,7 +58,8 @@ for full change log.
See [Release Notes](https://github.com/django-crispy-forms/crispy-tailwind/milestone/2?closed=1)
for full change log.

## 0.1 (2020-06-09)
0.1.0 - 2020-06-09
------------------

* First Release, please do come and test!
* Opinionated forms can be rendered with crispy filter
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ version = {attr = "crispy_tailwind.__version__"}
"Issues" = "https://github.com/django-crispy-forms/crispy-tailwind/issues"
"Changelog" = "https://github.com/django-crispy-forms/crispy-tailwind/releases"

[tool.autopub]
project-name = "Crispy-Tailwind"
git-username = "botpub"
git-email = "[email protected]"
append-github-contributor = true

[tool.black]
line-length = 119
target-version = ['py38']
Expand Down
Loading