Skip to content

Commit

Permalink
Change project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
LennP committed Jan 27, 2024
1 parent 8cf8c27 commit 8b812c8
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 46 deletions.
Empty file added .github/workflows/commit.yml
Empty file.
74 changes: 28 additions & 46 deletions .github/workflows/release_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,35 @@ permissions:
contents: read

jobs:
verify:
name: Verify Python build
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pylint
build:
name: Build and publish to PyPi
needs: verify
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
- name: Extract release version
id: release_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Update version in setup.py
run: sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.release_version.outputs.VERSION }}/g" setup.py

- name: Build package
run: python setup.py sdist

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade build
- name: Extract release version
id: release_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Update version in setup.py
run: sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.release_version.outputs.VERSION }}/g" setup.py

- name: Build package
run: python setup.py sdist

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8b812c8

Please sign in to comment.