File tree Expand file tree Collapse file tree 2 files changed +68
-1
lines changed Expand file tree Collapse file tree 2 files changed +68
-1
lines changed Original file line number Diff line number Diff line change 34
34
- name : Run mypy type checker
35
35
run : poetry run mypy opencosmo
36
36
37
- test :
37
+ run- test :
38
38
name : Test
39
39
runs-on : ${{ matrix.os }}
40
40
needs : lint-typecheck
67
67
run : |
68
68
source $VENV
69
69
pytest .
70
+ build :
71
+ name : build
72
+ runs-on : ${{ matrix.os }}
73
+ needs : test
74
+ strategy :
75
+ matrix :
76
+ os : [ubuntu-latest, macos-latest, windows-latest]
77
+ python-version : ['3.11', '3.12', '3.13']
78
+ defaults :
79
+ run :
80
+ shell : bash
81
+ steps :
82
+ - name : Checkout repository
83
+ uses : actions/checkout@v4
84
+
85
+ - name : Set up Python
86
+ uses : actions/setup-python@v4
87
+ with :
88
+ python-version : ${{ matrix.python-version }}
89
+ - name : Install Poetry
90
+ uses : snok/install-poetry@v1
91
+ with :
92
+ virtualenvs-create : true
93
+ virtualenvs-in-project : true
94
+ - name : Build package
95
+ run : poetry build
96
+
97
+
98
+
70
99
Original file line number Diff line number Diff line change
1
+ name : release
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' [0-9]+.[0-9]+.[0-9]+'
6
+
7
+ jobs :
8
+ check-pyproject-version :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+ - uses : actions/setup-python@v4
13
+ - uses : snok/install-poetry@v1
14
+ - name : get pyproject.toml version
15
+ run : |
16
+ PROJECT_VERSION=$(poetry version --short)
17
+ echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
18
+ - name : check version
19
+ run : |
20
+ echo "Checking version"
21
+ echo "PROJECT_VERSION=$PROJECT_VERSION"
22
+ echo "TAG=${{ github.ref }}"
23
+ if [[ $PROJECT_VERSION != ${{ github.ref }} ]]; then
24
+ echo "Version mismatch"
25
+ exit 1
26
+ fi
27
+ echo "Version match"
28
+ publish-package :
29
+ runs-on : ubuntu-latest
30
+ needs : check-pyproject-version
31
+ uses : JRubics/poetry-publish-action@v2
32
+ with :
33
+ pypi_token : ${{ secrets.PYPI_TOKEN }}
34
+
35
+
36
+
37
+
38
+
You can’t perform that action at this time.
0 commit comments