Skip to content

Commit

Permalink
feat: Add pypi actions, bump version (#180)
Browse files Browse the repository at this point in the history
* Add pypi actions, bump version

* Update actions

* Update publish-to-test-pypi.yml
  • Loading branch information
fsbraun authored May 30, 2023
1 parent 4060eb9 commit 35b3e70
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/publish-to-live-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Python 🐍 distributions πŸ“¦ to pypi

on:
release:
types:
- published

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to pypi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/djangocms-alias
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
43 changes: 43 additions & 0 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish Python 🐍 distributions πŸ“¦ to TestPyPI

on:
push:
branches:
- master

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to TestPyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://test.pypi.org/p/djangocms-alias
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution πŸ“¦ to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip_existing: true
2 changes: 1 addition & 1 deletion djangocms_alias/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.11.0'
__version__ = '2.0.0rc1'

0 comments on commit 35b3e70

Please sign in to comment.