File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 8
8
# Triggers the workflow on push or pull request events but only for the "main" branch
9
9
pull_request : []
10
10
push :
11
+ tags :
12
+ - ' *'
11
13
branches :
12
14
- ' main'
13
15
# Allows you to run this workflow manually from the Actions tab
@@ -111,3 +113,39 @@ jobs:
111
113
poetry run make doctest
112
114
poetry run make linkcheck
113
115
116
+
117
+ build_release :
118
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
119
+ needs : build
120
+ runs-on : ubuntu-22.04
121
+
122
+ steps :
123
+ - uses : actions/checkout@v3
124
+
125
+ - name : Install Poetry
126
+ run : curl -sSL https://install.python-poetry.org | python - --version 1.6.1
127
+
128
+ - name : Poetry build
129
+ run : poetry build
130
+
131
+ - uses : actions/upload-artifact@v3
132
+ with :
133
+ name : pypi-build
134
+ path : ./dist
135
+
136
+ publish :
137
+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
138
+ needs : build_release
139
+ runs-on : ubuntu-22.04
140
+ environment :
141
+ name : pypi-publish
142
+ url : https://pypi.org/project/cfspopcon/
143
+ permissions :
144
+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
145
+ steps :
146
+ - uses : actions/download-artifact@v3
147
+ with :
148
+ name : pypi-build
149
+
150
+ - name : Publish package distributions to PyPI
151
+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments