Skip to content

Commit daef65c

Browse files
committed
🎉
0 parents  commit daef65c

File tree

12 files changed

+785
-0
lines changed

12 files changed

+785
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
liberapay: jarbasAI

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pip" # See documentation for possible values
9+
directory: "/requirements" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build_tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run Build Tests
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build_tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
ref: ${{ github.head_ref }}
13+
- name: Setup Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: 3.8
17+
- name: Install Build Tools
18+
run: |
19+
python -m pip install build wheel
20+
- name: Build Distribution Packages
21+
run: |
22+
python setup.py bdist_wheel
23+
- name: Install package
24+
run: |
25+
pip install .
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# auto add labels to PRs
2+
on:
3+
pull_request_target:
4+
types: [ opened, edited ]
5+
name: conventional-release-labels
6+
jobs:
7+
label:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: bcoe/conventional-release-labels@v1
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Stable Release
2+
on:
3+
push:
4+
branches: [master]
5+
workflow_dispatch:
6+
7+
jobs:
8+
publish_stable:
9+
uses: TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master
10+
secrets: inherit
11+
with:
12+
branch: 'master'
13+
version_file: 'hivemind_sqlite_database/version.py'
14+
setup_py: 'setup.py'
15+
publish_release: true
16+
17+
publish_pypi:
18+
needs: publish_stable
19+
if: success() # Ensure this job only runs if the previous job succeeds
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
ref: dev
25+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
26+
- name: Setup Python
27+
uses: actions/setup-python@v1
28+
with:
29+
python-version: 3.8
30+
- name: Install Build Tools
31+
run: |
32+
python -m pip install build wheel
33+
- name: version
34+
run: echo "::set-output name=version::$(python setup.py --version)"
35+
id: version
36+
- name: Build Distribution Packages
37+
run: |
38+
python setup.py sdist bdist_wheel
39+
- name: Publish to PyPI
40+
uses: pypa/gh-action-pypi-publish@master
41+
with:
42+
password: ${{secrets.PYPI_TOKEN}}
43+
44+
45+
sync_dev:
46+
needs: publish_stable
47+
if: success() # Ensure this job only runs if the previous job succeeds
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v2
51+
with:
52+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
53+
ref: master
54+
- name: Push master -> dev
55+
uses: ad-m/github-push-action@master
56+
with:
57+
github_token: ${{ secrets.GITHUB_TOKEN }}
58+
branch: dev
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Release Alpha and Propose Stable
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches: [dev]
7+
8+
jobs:
9+
publish_alpha:
10+
if: github.event.pull_request.merged == true
11+
uses: TigreGotico/gh-automations/.github/workflows/publish-alpha.yml@master
12+
secrets: inherit
13+
with:
14+
branch: 'dev'
15+
version_file: 'hivemind_sqlite_database/version.py'
16+
setup_py: 'setup.py'
17+
update_changelog: true
18+
publish_prerelease: true
19+
changelog_max_issues: 100
20+
21+
notify:
22+
if: github.event.pull_request.merged == true
23+
needs: publish_alpha
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Send message to Matrix bots channel
28+
id: matrix-chat-message
29+
uses: fadenb/[email protected]
30+
with:
31+
homeserver: 'matrix.org'
32+
token: ${{ secrets.MATRIX_TOKEN }}
33+
channel: '!WjxEKjjINpyBRPFgxl:krbel.duckdns.org'
34+
message: |
35+
new ${{ github.event.repository.name }} PR merged! https://github.com/${{ github.repository }}/pull/${{ github.event.number }}
36+
37+
publish_pypi:
38+
needs: publish_alpha
39+
if: success() # Ensure this job only runs if the previous job succeeds
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v2
43+
with:
44+
ref: dev
45+
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
46+
- name: Setup Python
47+
uses: actions/setup-python@v1
48+
with:
49+
python-version: 3.8
50+
- name: Install Build Tools
51+
run: |
52+
python -m pip install build wheel
53+
- name: version
54+
run: echo "::set-output name=version::$(python setup.py --version)"
55+
id: version
56+
- name: Build Distribution Packages
57+
run: |
58+
python setup.py sdist bdist_wheel
59+
- name: Publish to PyPI
60+
uses: pypa/gh-action-pypi-publish@master
61+
with:
62+
password: ${{secrets.PYPI_TOKEN}}
63+
64+
65+
propose_release:
66+
needs: publish_alpha
67+
if: success() # Ensure this job only runs if the previous job succeeds
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Checkout dev branch
71+
uses: actions/checkout@v3
72+
with:
73+
ref: dev
74+
75+
- name: Setup Python
76+
uses: actions/setup-python@v2
77+
with:
78+
python-version: '3.10'
79+
80+
- name: Get version from setup.py
81+
id: get_version
82+
run: |
83+
VERSION=$(python setup.py --version)
84+
echo "VERSION=$VERSION" >> $GITHUB_ENV
85+
86+
- name: Create and push new branch
87+
run: |
88+
git checkout -b release-${{ env.VERSION }}
89+
git push origin release-${{ env.VERSION }}
90+
91+
- name: Open Pull Request from dev to master
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
run: |
95+
# Variables
96+
BRANCH_NAME="release-${{ env.VERSION }}"
97+
BASE_BRANCH="master"
98+
HEAD_BRANCH="release-${{ env.VERSION }}"
99+
PR_TITLE="Release ${{ env.VERSION }}"
100+
PR_BODY="Human review requested!"
101+
102+
# Create a PR using GitHub API
103+
curl -X POST \
104+
-H "Accept: application/vnd.github+json" \
105+
-H "Authorization: token $GITHUB_TOKEN" \
106+
-d "{\"title\":\"$PR_TITLE\",\"body\":\"$PR_BODY\",\"head\":\"$HEAD_BRANCH\",\"base\":\"$BASE_BRANCH\"}" \
107+
https://api.github.com/repos/${{ github.repository }}/pulls
108+

.gitignore

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# pdm
105+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106+
#pdm.lock
107+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108+
# in version control.
109+
# https://pdm.fming.dev/#use-with-ide
110+
.pdm.toml
111+
112+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113+
__pypackages__/
114+
115+
# Celery stuff
116+
celerybeat-schedule
117+
celerybeat.pid
118+
119+
# SageMath parsed files
120+
*.sage.py
121+
122+
# Environments
123+
.env
124+
.venv
125+
env/
126+
venv/
127+
ENV/
128+
env.bak/
129+
venv.bak/
130+
131+
# Spyder project settings
132+
.spyderproject
133+
.spyproject
134+
135+
# Rope project settings
136+
.ropeproject
137+
138+
# mkdocs documentation
139+
/site
140+
141+
# mypy
142+
.mypy_cache/
143+
.dmypy.json
144+
dmypy.json
145+
146+
# Pyre type checker
147+
.pyre/
148+
149+
# pytype static type analyzer
150+
.pytype/
151+
152+
# Cython debug symbols
153+
cython_debug/
154+
155+
# PyCharm
156+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158+
# and can be added to the global gitignore or merged into this file. For a more nuclear
159+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160+
#.idea/

0 commit comments

Comments
 (0)