-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
436 changed files
with
7,741 additions
and
3,634 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from string import Template | ||
|
||
import requests | ||
|
||
|
||
# Get the latest version from Github | ||
results = requests.get("https://api.github.com/repos/NearBeach/NearBeach/releases?page=1&per_page=1") | ||
results_json = results.json() | ||
|
||
# Using the results, find the tag name (aka version) | ||
version = results_json[0]['tag_name'] | ||
|
||
# Create the __init__.py file | ||
with open('./.github/deployment_files/template__init__.txt', 'r') as input_file: | ||
src = Template(input_file.read()) | ||
result = src.substitute({'version': version}) | ||
input_file.close() | ||
|
||
with open('./NearBeach/__init__.py', 'w') as output_file: | ||
output_file.write(result) | ||
output_file.close() | ||
|
||
# Create the pyproject.toml file | ||
with open('./.github/deployment_files/template_pyproject.toml', 'r') as input_file: | ||
src = Template(input_file.read()) | ||
result = src.substitute({'version': version}) | ||
input_file.close() | ||
|
||
with open('./pyproject.toml', 'w') as output_file: | ||
output_file.write(result) | ||
output_file.close() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
name = "NearBeach" | ||
__version__ = "$version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "NearBeach" | ||
version = "0.31.0-RC1" | ||
dependencies = [ | ||
"Django>=3.1", | ||
"simplejson", | ||
"pillow>=10.0.1", | ||
"urllib3", | ||
"boto3", | ||
"azure-storage-blob", | ||
"azure-identity", | ||
"pip>=19.2", | ||
] | ||
requires-python = ">=3.8" | ||
authors = [ | ||
{name = "Luke Christopher Clarke", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Luke Christopher Clarke", email = "[email protected]"}, | ||
] | ||
description = "NearBeach - an open source project management tool" | ||
readme = "README.md" | ||
license = {file = "LICENSE"} | ||
keywords = [ | ||
"project", | ||
"task", | ||
"project management", | ||
"request for change", | ||
"open source" | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black", | ||
"bandit", | ||
"python-dotenv", | ||
"django-storages", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://nearbeach.org" | ||
Documentation = "https://nearbeach.readthedocs.org" | ||
Repository = "https://github.com/NearBeach/NearBeach.git" | ||
"Bug Tracker" = "https://nearbeach.youtrack.cloud" | ||
|
||
[project.scripts] | ||
"manage.py" = "myproject:django_manage" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Deploy NearBeach | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy-nearbeach: | ||
runs-on: ubuntu-latest | ||
environment: main | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12.1 | ||
- name: Update Pip and Install Required Python Libraries | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade build | ||
pip install requests setuptools wheel | ||
- name: Create __init__.py and PyProject.toml files | ||
run: | | ||
python3 ./.github/deployment_files/generate_templates.py | ||
- name: Build Package | ||
run: | | ||
python -m build | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
deploy-static-files: | ||
needs: deploy-nearbeach | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12.1 | ||
- name: Create __init__.py and PyProject.toml files | ||
run: | | ||
python3 ./.github/deployment_files/generate_templates.py | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --editable .[dev] | ||
- name: Collect Static files | ||
env: | ||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_STORAGE_BUCKET_NAME: ${{ secrets.AWS_STORAGE_BUCKET_NAME }} | ||
run: | | ||
python manage.py collectstatic --noinput | ||
trigger-docker-build: | ||
needs: [deploy-static-files, deploy-nearbeach] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Curl to trigger docker deployment | ||
run: | | ||
curl -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.BEARER_TOKEN_FOR_GITHUB_ACTIONS }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/repos/NearBeach/nearbeach-docker/dispatches \ | ||
-d '{"event_type":"deploy_nearbeach","client_payload":{"version":"${{ github.ref_name }}"}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
name = "NearBeach" | ||
__version__ = "0.30.35" | ||
__version__ = "local_development" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.