Skip to content

Commit

Permalink
GitHub workflow release build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
rudyryk committed Nov 9, 2023
1 parent 33a0fdb commit 46922f4
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 7 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish release

on:
release:
types:
- published
push:
branches:
- develop

jobs:
publish:
runs-on: ubuntu-latest
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_NON_INTERACTIVE: "true"
steps:
-
name: Checkout repository
uses: actions/checkout@v2
-
name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: x64
-
name: Install dependencies
run: |
python3 -m venv ./venv && \
source venv/bin/activate && \
pip install --upgrade pip && \
pip install --upgrade build && \
pip install twine
-
name: Build and release
run: |
source venv/bin/activate && \
python -m build && \
python -m twine check dist/*
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ RUN apk --no-cache add \

RUN pip3 install coverme>=0.8.0

COPY etc/periodic/ /etc/periodic/

RUN chmod -R +x /etc/periodic/
# NOTE: Mount /etc/periodic/ to run the cron jobs
# COPY etc/periodic/ /etc/periodic/

CMD ["/usr/sbin/crond", "-f"]
4 changes: 2 additions & 2 deletions coverme.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
try:
from future.builtins import super
from future.builtins import super # type: ignore
except ImportError:
pass

Expand All @@ -15,7 +15,7 @@
from copy import deepcopy

try:
from urlparse import urlparse
from urlparse import urlparse # type: ignore
except ImportError:
import urllib.parse
urlparse = urllib.parse.urlparse
Expand Down
2 changes: 1 addition & 1 deletion etc/coverme/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defaults:

backups:
- type: database
url: postgres://postgres:postgres@127.0.0.1:5432/{env[POSTGRES_DB]}
url: postgres://postgres:{env[POSTGRES_PASSWORD]}@127.0.0.1:5432/{env[POSTGRES_DB]}
to: [bucket1]
name: postgres-{mm}-{dd}.sql
tags: postgres
Expand Down
File renamed without changes.
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,9 @@ version = {attr = "coverme.__version__"}
readme = {file = ["README.md"], content-type = "text/markdown"}

[build-system]
requires = ["setuptools", "setuptools-scm"]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project.urls]
"Homepage" = "https://github.com/05bit/coverme"
"Bug Tracker" = "https://github.com/05bit/coverme/issues"

0 comments on commit 46922f4

Please sign in to comment.