File tree Expand file tree Collapse file tree 2 files changed +35
-14
lines changed Expand file tree Collapse file tree 2 files changed +35
-14
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,9 @@ name: Python Package
2
2
3
3
on :
4
4
push :
5
- tags : [ '*' ]
6
- branches : [ "main" ]
5
+ branches : [ "master" ]
6
+ pull_request :
7
+ branches : [ "master" ]
7
8
8
9
jobs :
9
10
build :
24
25
- name : Test with doctest
25
26
run : |
26
27
python -m doctest -v shinny_calendar/*
27
-
28
- - name : Build package
29
- run : |
30
- pip install build
31
- python -m build
32
-
33
- - name : Publish to Pypi
34
- if : startsWith(github.event.ref, 'refs/tags')
35
- uses : pypa/gh-action-pypi-publish@master
36
- with :
37
- user : __token__
38
- password : ${{ secrets.PYPI_PASSWORD }}
Original file line number Diff line number Diff line change
1
+ name : Publish Python Package
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ pypi-publish :
9
+ name : Upload release to PyPI
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
13
+
14
+ steps :
15
+ - name : Checkout source
16
+ uses : actions/checkout@v3
17
+
18
+ - name : Set up Python
19
+ uses : actions/setup-python@v4
20
+ with :
21
+ python-version : " 3.10"
22
+
23
+ - name : Install dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install build
27
+
28
+ - name : Build package
29
+ run : python -m build
30
+
31
+ - name : Publish package distributions to PyPI
32
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments