Skip to content

Commit

Permalink
Files needed for test publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperraemaekers committed Jul 9, 2024
1 parent a5cb2b3 commit ce84a9b
Show file tree
Hide file tree
Showing 7 changed files with 2,163 additions and 7 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build package

on:
push:
branches:
- "**"
tags-ignore:
- "**"

jobs:
build:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Make package
run: |
make build
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish package

# asume any tag to be a release
on:
push:
tags:
- '*'

jobs:
publish:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Make package
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
PYPI_URL: ${{ vars.PYPI_URL }}
run: |
make publish REPO=$PYPI_URL USER=$PYPI_USER PASSWORD=$PYPI_PASSWORD
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: weheat_backend_client
path: |
build/*
if-no-files-found: error
2,078 changes: 2,078 additions & 0 deletions .gitignore

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ROOT_DIR := ${shell git rev-parse --show-toplevel}
BUILD_DIR = $(ROOT_DIR)/build

.PHONY: clean build

clean:
@rm -rf $(BUILD_DIR)

venv/bin/python:
@python3 -m venv venv
@. venv/bin/activate && pip install --upgrade build twine

build: venv/bin/python
@mkdir -p $(BUILD_DIR)
@. venv/bin/activate &&python3 -m build -o $(BUILD_DIR)

publish: build
. venv/bin/activate &&twine upload --repository-url ${REPO} -u ${USER} -p ${PASSWORD} build/*

help:
@echo "The following targets are available:"
@echo "clean Cleans the build forder"
@echo "build Compile the python code to a package"
@echo "publish publish package to REPO with USER and PASSWORD as variables
4 changes: 2 additions & 2 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Metadata-Version: 2.1
Name: weheat_backend_client
Version: 2024.6.19
Version: 2024.6.19rc1
Summary: Weheat Backend
Home-page: https://github.com/wefabricate/wh-pubic-backend-client
Home-page: https://github.com/wefabricate/wh-public-backend-client
Author: Jesper Raemaekers
Author-email: [email protected]
Keywords: OpenAPI,OpenAPI-Generator,Weheat Backend
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[tool.poetry]
name = "weheat_backend_client"
version = "2024.06.19"
version = "2024.06.19rc1"
description = "Weheat Backend"
authors = ["Jesper Raemaekers <[email protected]>"]
license = "NoLicense"
readme = "README.md"
repository = "https://github.com/wefabricate/wh-pubic-backend-client"
repository = "https://github.com/wefabricate/wh-public-backend-client"
keywords = ["OpenAPI", "OpenAPI-Generator", "Weheat Backend"]
include = ["weheat_backend_client/py.typed"]

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "weheat_backend_client"
VERSION = "2024.06.19"
VERSION = "2024.06.19rc1"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
Expand All @@ -36,14 +36,14 @@
description="Weheat Backend client",
author="Jesper Raemaekers",
author_email="[email protected]",
url="https://github.com/wefabricate/wh-pubic-backend-client",
url="https://github.com/wefabricate/wh-public-backend-client",
keywords=["OpenAPI", "OpenAPI-Generator", "Weheat Backend"],
install_requires=REQUIRES,
packages=find_packages(exclude=["test", "tests"]),
include_package_data=True,
long_description_content_type='text/markdown',
long_description="""\
This is the backend for the Weheat project
This is a client for the Weheat backend
""", # noqa: E501
package_data={"weheat_backend_client": ["py.typed"]},
)

0 comments on commit ce84a9b

Please sign in to comment.