Skip to content

Commit 22baeea

Browse files
authored
Merge pull request #5 from TaskarCenterAtUW/develop
Develop to Main
2 parents c9d77af + fcb5476 commit 22baeea

35 files changed

+3853
-39
lines changed

.github/workflows/blank.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish to Test.PyPI.org
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
publish:
10+
environment:
11+
name: Development
12+
name: Publish distribution 📦 to Test PyPI
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout source code
16+
uses: actions/checkout@v3
17+
18+
- name: Installing python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.10'
22+
23+
- name: Installing git
24+
run: pip install gitpython
25+
26+
- name: Generating version file
27+
run: python freeze_version.py
28+
29+
- name: Setup python wheel
30+
run: pip install wheel
31+
32+
- name: Building Package
33+
run: python setup.py bdist_wheel
34+
35+
- name: Publish package
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
skip_existing: true
39+
password: ${{ secrets.PYPI_API_TOKEN }}
40+
repository_url: https://test.pypi.org/legacy/
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Check and Publish to PyPi
2+
on:
3+
push:
4+
tags:
5+
- '*.*.*' # Eg. 0.0.1
6+
workflow_dispatch:
7+
8+
jobs:
9+
PublishToPyPi:
10+
environment:
11+
name: Production
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout source code
15+
uses: actions/checkout@v3
16+
17+
- name: Installing python 3.10
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.10'
21+
22+
- name: Installing git
23+
run: pip install gitpython
24+
25+
- name: Generate local version
26+
run: python freeze_version.py
27+
28+
- name: Fetch local package version
29+
run: |
30+
packageLocalVersion=$(python -c 'from version import version; print(version);')
31+
echo "localVersion=$packageLocalVersion" >> $GITHUB_ENV
32+
33+
- name: Fetch remote package version
34+
run: |
35+
packageRemoteVersion=$(python -c "exec(\"import pkg_resources\\ntry: print(pkg_resources.get_distribution('python-osw-validation').version)\\nexcept pkg_resources.DistributionNotFound: print('0.0.0');\")")
36+
echo "remoteVersion=$packageRemoteVersion" >> $GITHUB_ENV
37+
38+
- name: Printing local and remote versions
39+
run: echo "Local version ${{env.localVersion}} and remote version ${{env.remoteVersion}}"
40+
41+
- name: Compare local and remote version with dpkg
42+
run: dpkg --compare-versions ${{env.localVersion}} "gt" ${{env.remoteVersion}}
43+
44+
45+
- name: Setup python wheel
46+
run: pip install wheel
47+
48+
- name: Building Package
49+
run: python setup.py bdist_wheel
50+
51+
- name: Publish package
52+
uses: pypa/gh-action-pypi-publish@release/v1
53+
with:
54+
password: ${{ secrets.PYPI_API_TOKEN }}
55+

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ parts/
2020
sdist/
2121
var/
2222
wheels/
23+
pip-wheel-metadata/
2324
share/python-wheels/
2425
*.egg-info/
2526
.installed.cfg
@@ -49,7 +50,6 @@ coverage.xml
4950
*.py,cover
5051
.hypothesis/
5152
.pytest_cache/
52-
cover/
5353

5454
# Translations
5555
*.mo
@@ -72,7 +72,6 @@ instance/
7272
docs/_build/
7373

7474
# PyBuilder
75-
.pybuilder/
7675
target/
7776

7877
# Jupyter Notebook
@@ -157,4 +156,4 @@ cython_debug/
157156
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158157
# and can be added to the global gitignore or merged into this file. For a more nuclear
159158
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
#.idea/
159+
.idea/

0 commit comments

Comments
 (0)