Skip to content

Commit

Permalink
Merge pull request #5 from bimdata/chores/new-ci-publish-workflow
Browse files Browse the repository at this point in the history
Trying to rework the ci for pypi upload.
  • Loading branch information
RomainMou authored May 28, 2024
2 parents d35212c + b8d0ce5 commit 77d82aa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
python setup.py sdist
twine check dist/*
# taken from https://python-semantic-release.readthedocs.io/en/latest/migrating_from_v7.html
release:
runs-on: self-hosted
needs: test
Expand All @@ -29,26 +30,19 @@ jobs:
refs/heads/main'
, github.ref)
concurrency: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
- name: Python Semantic Release
id: release
uses: python-semantic-release/[email protected]
with:
python-version: 3.11
- name: Install ci requirements
run: pip install -r ci-requirements.txt
- name: Release
run: |
git config --global user.email "[email protected]"
git config --global user.name "GA"
PYTHONPATH=$PWD python setup.py sdist
PYTHONPATH=$PWD semantic-release version
PYTHONPATH=$PWD twine upload --non-interactive dist/*
PYTHONPATH=$PWD semantic-release publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'
2 changes: 0 additions & 2 deletions ci-requirements.txt

This file was deleted.

0 comments on commit 77d82aa

Please sign in to comment.