-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to simplified release workflow
- Loading branch information
Ferdinand Hoffmann
committed
Dec 6, 2023
1 parent
46c7141
commit 45489fa
Showing
4 changed files
with
45 additions
and
90 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|