Skip to content

Commit 1414a53

Browse files
committed
Add release process to CI pipeline
1 parent 4cb43c9 commit 1414a53

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
release:
99
types:
1010
- published
11+
workflow_dispatch:
1112

1213
jobs:
1314
build_wheel:
@@ -44,3 +45,20 @@ jobs:
4445
source pyasn1-alt-modules-testbed/bin/activate
4546
pip install "$WHEELFILE"
4647
python -m unittest discover -s tests
48+
49+
release_wheel:
50+
needs: [test_wheel]
51+
runs-on: ubuntu-latest
52+
if: github.event_name == 'release' && github.event.action == 'published' || github.event_name == 'workflow_dispatch'
53+
environment:
54+
name: "${{ github.event.name == 'release' && 'pypi' || 'testpypi' }}"
55+
url: "${{ github.event.name == 'release' && 'https://pypi.org/p/pyasn1-alt-modules' || 'https://test.pypi.org/p/pyasn1-alt-modules' }}"
56+
permissions:
57+
id-token: write
58+
steps:
59+
- uses: actions/download-artifact@v4
60+
with:
61+
name: artifact
62+
path: dist
63+
- name: Publish package distributions to PyPI
64+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)