File tree Expand file tree Collapse file tree 2 files changed +48
-30
lines changed Expand file tree Collapse file tree 2 files changed +48
-30
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ pre-commit :
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+ - uses : actions/checkout@v4
10
+
11
+ - uses : actions/setup-python@v5
12
+ with :
13
+ python-version : " 3.10"
14
+
15
+ # Install and run pre-commit
16
+ - run : |
17
+ pip install pre-commit
18
+ pre-commit install
19
+ pre-commit run --all-files
20
+
21
+ release :
22
+ needs : [pre-commit]
23
+ runs-on : ubuntu-latest
24
+ environment :
25
+ name : pypi
26
+ url : https://pypi.org/p/trame-slicer
27
+ permissions :
28
+ id-token : write # IMPORTANT: mandatory for trusted publishing
29
+ contents : write # IMPORTANT: mandatory for making GitHub Releases
30
+
31
+ steps :
32
+ - name : Checkout
33
+ uses : actions/checkout@v4
34
+ with :
35
+ fetch-depth : 0
36
+
37
+ - name : Python Semantic Release
38
+ id : release
39
+ uses : python-semantic-release/python-semantic-release@master
40
+ with :
41
+ github_token : ${{ secrets.GITHUB_TOKEN }}
42
+ changelog : true
43
+
44
+ # https://docs.pypi.org/trusted-publishers/using-a-publisher/
45
+ - name : Publish package distributions to PyPI
46
+ if : steps.release.outputs.released == 'true'
47
+ uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1
- name : Test and Release
1
+ name : Test and Merge
2
2
3
3
on :
4
4
push :
78
78
run : |
79
79
pip install .[dev]
80
80
pytest -s ./tests
81
-
82
- release :
83
- needs : [pre-commit]
84
- runs-on : ubuntu-latest
85
- if : github.event_name == 'push'
86
- environment :
87
- name : pypi
88
- url : https://pypi.org/p/trame-slicer
89
- permissions :
90
- id-token : write # IMPORTANT: mandatory for trusted publishing
91
- contents : write # IMPORTANT: mandatory for making GitHub Releases
92
-
93
- steps :
94
- - name : Checkout
95
- uses : actions/checkout@v4
96
- with :
97
- fetch-depth : 0
98
-
99
- - name : Python Semantic Release
100
- id : release
101
- uses : python-semantic-release/python-semantic-release@master
102
- with :
103
- github_token : ${{ secrets.GITHUB_TOKEN }}
104
- changelog : true
105
-
106
- # https://docs.pypi.org/trusted-publishers/using-a-publisher/
107
- - name : Publish package distributions to PyPI
108
- if : steps.release.outputs.released == 'true'
109
- uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments