Compare commits

..

3 commits

Author SHA1 Message Date
d5fc940e60
feat: add CI/CD workflow for PyPI package releases
All checks were successful
Python Package CI/CD / Publish to PyPI (push) Successful in 36s
Introduced a GitHub Actions workflow for automated CI/CD of the Python package. This setup includes:
- Triggering on push events to any tag
- Containerized build environment using Node 20 on Bookworm
- Steps for code checkout, dependency installation, and publishing to PyPI

This enhancement streamlines the release process and ensures consistent packaging and distribution of the Python package.
2024-06-19 09:37:22 +02:00
d15b0a53dc
chore: bump version to 0.0.2
Updated the version from 0.0.1 to 0.0.2 to reflect recent changes
and improvements in the project. This version increment is a
preparatory step for the upcoming release.
2024-06-19 09:33:43 +02:00
74e6a1310b
fix(preview.html): correct back to parent directory link
Updated the "Back to Parent Directory" link to handle file paths
starting with a slash. This adjustment ensures the URL is properly
constructed, preventing broken links and enhancing navigation
usability in the preview view.
2024-06-19 09:33:31 +02:00
3 changed files with 34 additions and 2 deletions

View file

@ -0,0 +1,32 @@
name: Python Package CI/CD
on:
workflow_dispatch:
push:
tags:
- "*"
jobs:
publish:
name: Publish to PyPI
container:
image: node:20-bookworm
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update
apt install -y python3 python3-venv
- name: Publish to PyPI
run: |
python3 -m venv venv
. ./venv/bin/activate
pip install -U twine build
python -m build .
python -m twine upload --username __token__ --password ${PYPI_TOKEN} dist/*
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "gitcloak" name = "gitcloak"
version = "0.0.1" version = "0.0.2"
authors = [{ name = "Private.coffee Team", email = "support@private.coffee" }] authors = [{ name = "Private.coffee Team", email = "support@private.coffee" }]
description = "Simple Python-based private frontend for GitHub repositories" description = "Simple Python-based private frontend for GitHub repositories"
readme = "README.md" readme = "README.md"

View file

@ -7,7 +7,7 @@
<div class="col-md-12"> <div class="col-md-12">
<h1>{{ owner }}/{{ repo }} - <small>{{ file_path }}</small></h1> <h1>{{ owner }}/{{ repo }} - <small>{{ file_path }}</small></h1>
<div class="mb-3"> <div class="mb-3">
<a href="/{{ owner }}/{{ repo }}/tree/main/{{ file_path.rsplit('/', 1)[0] }}"> <a href="/{{ owner }}/{{ repo }}/tree/main/{{ ("/" + file_path).rsplit('/', 1)[0].lstrip("/") }}">
<img class="icon" src="/assets/dist/icons/folder.svg" alt="Back to Parent Directory"> Back to Parent Directory <img class="icon" src="/assets/dist/icons/folder.svg" alt="Back to Parent Directory"> Back to Parent Directory
</a> </a>
</div> </div>