Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 9d3dafe

Browse files
committed
Add CD support to GitHub releases
1 parent 41b7e31 commit 9d3dafe

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/ci_cd.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: CI/CD
33
on:
44
push:
55
pull_request:
6+
release:
7+
types:
8+
- published
69

710
jobs:
811

@@ -44,8 +47,8 @@ jobs:
4447
- name: Publish to PyPI
4548
if: |
4649
github.repository == 'robotology/gym-ignition-models' &&
47-
github.ref == 'refs/heads/master' &&
48-
github.event_name != 'pull_request'
50+
((github.event_name == 'release' && github.event.action == 'published') ||
51+
(github.event_name == 'push' && github.ref == 'refs/heads/master'))
4952
uses: pypa/gh-action-pypi-publish@master
5053
with:
5154
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)