v1.11.0 #43
Workflow file for this run
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
name: Pypi | |
on: | |
release: | |
types: [published] | |
jobs: | |
pypi-release: | |
name: Pypi release | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/djang-napse | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: retrieve latest tag | |
run: | | |
tag=$(git describe --tags `git rev-list --tags --max-count=1`) | |
echo "LATEST_TAG=$tag" >> $GITHUB_ENV | |
- name: Update version in setup.py | |
env: | |
LATEST_TAG: ${{ env.LATEST_TAG }} | |
run: sed -i "s/{{VERSION}}/${{ env.LATEST_TAG }}/g" setup.py | |
- name: Install pypa/build | |
run: >- | |
python3 -m | |
pip install | |
build | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: >- | |
python3 -m | |
build | |
--sdist | |
--wheel | |
--outdir dist/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |