From 8b1a8291303352d5d63a1f4c32a6c17261f6ebdb Mon Sep 17 00:00:00 2001 From: raittes Date: Wed, 6 Aug 2025 15:35:56 -0300 Subject: [PATCH] circleci: build package --- .circleci/config.yml | 33 +++++++++++++++++++++++++++++++++ Makefile | 12 ++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .circleci/config.yml create mode 100644 Makefile diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..7c00fc69 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,33 @@ +tag-pattern: &tag-pattern + only: /^\d+\.\d+\.\d+$/ + +version: 2.1 + +jobs: + deploy: + docker: + - image: cimg/python:3.12 + steps: + - checkout + - run: + name: Package + command: make package + - persist_to_workspace: + root: . + paths: + - "dist" + +workflows: + version: 2 + main: + jobs: + - deploy: + context: org-global + requires: + - lint + - tests + filters: + branches: + ignore: /.*/ + tags: + <<: *tag-pattern diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..107777e4 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +clean: + rm -rf build dist *.egg-info + +dist: + python3 setup.py bdist_wheel --universal + +upload: + curl -F package=@`find dist -name "django_elasticsearch_dsl_drf-*.whl"` $(PRIVATE_PYPI_UPLOAD_URL) + curl -F package=@`find dist -name "django_elasticsearch_dsl_drf-*.whl"` $(FURY_LABCODES_PRIVATE_PYPI_UPLOAD_URL) + + +package: clean dist upload