Skip to content

Commit

Permalink
Switch to simplified release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdinand Hoffmann committed Dec 6, 2023
1 parent 46c7141 commit 45489fa
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 90 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/create_release.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/publish_release_on_pypi.yml

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/publish_release_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
release:
types: [published]

name: Upload packages to PyPI and GitHub release on release publish
jobs:
upload-packages:
name: Create release-artifacts
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
# required by ncipollo/release-action@v1
contents: write
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install build dependencies
run: |
pipx install poetry
- name: Check package version (compare package version with tag)
run: |
if [[ ! "$(poetry version -s)" = "${{ github.event.release.tag_name}}" ]]; then
echo "version mismatch: $(poetry version -s) (package) vs ${{ github.event.release.tag_name }} (tag)"
exit 1
fi
- name: Build sdist & wheel
run: |
poetry build
- name: Update release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
artifacts: "dist/*"
- name: Publish python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# uses trusted publishing (no username & password required)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-ses-sns-tracker"
version = "3.0.0"
version = "4.0.0rc1"
description = "Simple wrapper around django-ses to receive and persist sns event data"
authors = ["anfema GmbH <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 45489fa

Please sign in to comment.