Skip to content

Commit f071714

Browse files
committed
workflow
1 parent f7709f2 commit f071714

File tree

3 files changed

+89
-1
lines changed

3 files changed

+89
-1
lines changed

.github/workflows/publish.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
test:
11+
uses: ./.github/workflows/test.yml
12+
secrets: inherit
13+
14+
build:
15+
name: build objectfactory dist
16+
needs: test
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: check out git repository
22+
uses: actions/checkout@v4
23+
24+
- name: setup python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.x'
28+
29+
- name: install python dependencies
30+
run: pip install build
31+
32+
- name: build binary wheel and source tarball
33+
run: python3 -m build
34+
35+
- name: store the dist package
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: distribution
39+
path: dist/
40+
41+
42+
publish:
43+
name: publish objectfactory to pypi
44+
needs: build
45+
46+
runs-on: ubuntu-latest
47+
environment:
48+
name: release
49+
url: https://pypi.org/p/objectfactory
50+
permissions:
51+
id-token: write
52+
53+
steps:
54+
- name: get dist package
55+
uses: actions/download-artifact@v4
56+
with:
57+
name: distribution
58+
path: dist/
59+
60+
- name: publish package to pypi
61+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: test
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_call:
7+
8+
jobs:
9+
10+
test:
11+
name: run objectfactory unit tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: check out git repository
16+
uses: actions/checkout@v4
17+
18+
- name: setup conda env
19+
uses: conda-incubator/setup-miniconda@v2
20+
with:
21+
activate-environment: py-object-factory
22+
environment-file: environment.yml
23+
auto-activate-base: false
24+
25+
- name: pytest
26+
shell: bash -l {0}
27+
run: pytest -s -v ./test

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name='objectfactory',
8-
version='0.1.1',
8+
version='0.2.0b1',
99
author='Devin A. Conley',
1010
author_email='[email protected]',
1111
description='objectfactory is a python package to easily implement the factory design pattern for object creation, serialization, and polymorphism',

0 commit comments

Comments
 (0)