Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rexruan committed Nov 24, 2023
1 parent 696918f commit 61fa84b
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 6 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pypi deployment

on:
push:
paths:
- swegram_main/version.py

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Build
run: |
python setup.py bdist_wheel
- name: Twine Check
run: |
twine check dist/*.whl
- name: Depoly
run: |
twine upload dist/* --verbose
7 changes: 3 additions & 4 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint
pip install pytest
pip install -r requirements-dev.txt
- name: Analysing the code with pylint
run: |
pylint swegram_main
- name: Analysing the code with test
run: |
source setup.sh
pip install .
swegram-build
pytest tests -vvvv
5 changes: 5 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r requirements.txt
pytest
pylint
wheel
twine
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ def get_requirements() -> List[str]:
version=VERSION,
description="CLI library for Swegram",
long_description=(Base / "README.md").read_text(encoding="utf-8"),
long_description_content_type="text/markdown",
packages=find_packages(exclude=["tools*", "test*", "swegram/*", "swegram_django*"]),
# license=(Base / "LICENSE").read_text(encoding="utf-8"),
license=(Base / "LICENSE.md").read_text(encoding="utf-8"),
url="https://github.com/bmegyesi/swegram-v2",
install_requires=get_requirements(),
package_data={
Expand Down
2 changes: 1 addition & 1 deletion swegram_main/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""version module"""

VERSION = "1.0.5"
VERSION = "1.0.6"

0 comments on commit 61fa84b

Please sign in to comment.