Skip to content

Commit ba5c830

Browse files
authored
Merge pull request #1 from TaskarCenterAtUW/develop
Develop to Master
2 parents 5505782 + c559080 commit ba5c830

80 files changed

Lines changed: 1831 additions & 4 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
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: Install Requirements
24+
run: pip install -r requirements.txt
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: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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_ms_core').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+
- name: Install Requirements
45+
run: pip install -r requirements.txt
46+
47+
- name: Setup python wheel
48+
run: pip install wheel
49+
50+
- name: Building Package
51+
run: python setup.py bdist_wheel
52+
53+
- name: Publish package
54+
uses: pypa/gh-action-pypi-publish@release/v1
55+
with:
56+
password: ${{ secrets.PYPI_API_TOKEN }}
57+

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ ipython_config.py
9393

9494
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
9595
__pypackages__/
96+
version.py
97+
.build/
98+
.env
99+
service_details.json
100+
.idea/
101+
96102

97103
# Celery stuff
98104
celerybeat-schedule

0 commit comments

Comments
 (0)