File tree Expand file tree Collapse file tree 2 files changed +56
-2
lines changed Expand file tree Collapse file tree 2 files changed +56
-2
lines changed Original file line number Diff line number Diff line change 51
51
- name : Test
52
52
run : |
53
53
poetry run pre-commit run --all-files
54
- poetry run coverage run -m pytest
54
+ poetry run coverage run --module pytest
55
55
poetry run coverage report
56
56
- name : Build
57
57
run : |
58
- poetry build
58
+ poetry build --format wheel
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : publish
3
+
4
+ # Actions for any tag.
5
+
6
+ # -----------------
7
+ # Control variables (GitHub Secrets)
8
+ # -----------------
9
+ #
10
+ # At the GitHub 'organisation' or 'project' level you must have the following
11
+ # GitHub 'Repository Secrets' defined (i.e. via 'Settings -> Secrets'): -
12
+ #
13
+ # PYPI_USERNAME
14
+ # PYPI_TOKEN
15
+ #
16
+ # -----------
17
+ # Environment (GitHub Environments)
18
+ # -----------
19
+ #
20
+ # Environment (none)
21
+
22
+ on :
23
+ push :
24
+ tags :
25
+ - ' **'
26
+
27
+ env :
28
+ POETRY_VERSION : ' 1.8.3'
29
+
30
+ jobs :
31
+ build-and-publish :
32
+ runs-on : ubuntu-latest
33
+ permissions :
34
+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
35
+ steps :
36
+ - name : Checkout
37
+ uses : actions/checkout@v4
38
+ - name : Inject slug/short variables
39
+ uses : rlespinasse/github-slug-action@v4
40
+ - name : Set up Python
41
+ uses : actions/setup-python@v5
42
+ with :
43
+ python-version : ' 3.12'
44
+ - name : Install dependencies
45
+ run : |
46
+ python -m pip install --upgrade pip
47
+ pip install --no-cache-dir poetry==$POETRY_VERSION
48
+ poetry install --with dev --no-root --no-directory
49
+ - name : Build
50
+ run : |
51
+ poetry version $GITHUB_REF_SLUG
52
+ poetry build --format wheel
53
+ - name : Publish
54
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments