File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish to PyPI
2
+
3
+ on : workflow_dispatch
4
+
5
+ permissions :
6
+ actions : write
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout project
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Setup Python
17
+ uses : actions/setup-python@v5
18
+ with :
19
+ python-version : " 3.11"
20
+
21
+ - name : Install Poetry
22
+ uses : abatilo/actions-poetry@v4
23
+ with :
24
+ poetry-version : " 1.8.5"
25
+
26
+ - name : Setup a local virtual environment
27
+ run : |
28
+ poetry config virtualenvs.create true --local
29
+ poetry config virtualenvs.in-project true --local
30
+
31
+ - name : Define a cache for the virtual environment based on the dependencies lock file
32
+ uses : actions/cache@v4
33
+ with :
34
+ path : ./.venv
35
+ key : venv-${{ hashFiles('poetry.lock') }}
36
+
37
+ - name : Build
38
+ run : poetry build
39
+
40
+ - name : Upload build artifacts
41
+ uses : actions/upload-artifact@v4
42
+ with :
43
+ name : csaps-packages
44
+ path : dist/*
45
+ overwrite : true
46
+
47
+ upload :
48
+ name : Upload to PyPI
49
+ needs : [ build ]
50
+ runs-on : ubuntu-latest
51
+ environment :
52
+ name : pypi
53
+ url : https://pypi.org/project/csaps
54
+ permissions :
55
+ id-token : write
56
+
57
+ steps :
58
+ - uses : actions/download-artifact@v4
59
+ with :
60
+ name : csaps-packages
61
+ path : dist
62
+ - name : Publish package to PyPI
63
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments