Skip to content
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
34 changes: 15 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,26 @@ permissions:
contents: read # required for github.ref to be set

jobs:
pypi:
name: Publish release on PyPI
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
environment:
name: pypi
url: https://pypi.org/p/alibuild
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Checkout bits
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install build dependencies # needed by our setup.py
run: python -m pip install setuptools
- name: Build the Python distribution
run: python setup.py sdist
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.pypi_password }}
# retrieve your distributions here
- name: Install build dependencies
run: python -m pip install --upgrade setuptools build pip
- name: Build the Python distribution
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

brew:
name: Update Homebrew formula
needs: pypi
needs: pypi-publish
runs-on: macos-latest
if: startsWith(github.ref, 'refs/tags/') && !github.event.release.prerelease
steps:
Expand Down
11 changes: 2 additions & 9 deletions PACKAGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,5 @@ alibuild is available from PyPi. Package page at:
In order to publish a new version:

- Test, test, test.
- Change the tag in setup.py
- Build the source distribution with:

python setup.py build sdist

- Publish with:

twine upload dist/*

- Create a new release in GitHub.
- The github action should automatically create a new release and upload the package to PyPi (it's a good idea to verify that the release was created and the package uploaded).
Loading