Skip to content

Commit 4f14f8f

Browse files
committed
fix github action workflow
1 parent e01038d commit 4f14f8f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Python package
22

3-
on: [push]
3+
on:
4+
push:
5+
pull_request:
46

57
jobs:
68
build:

.github/workflows/pypi.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- master
8+
pull_request:
89

910
jobs:
1011
publish:
@@ -49,7 +50,7 @@ jobs:
4950
python setup.py sdist bdist_wheel
5051
5152
- name: Publish distribution to PyPI
52-
if: steps.release_info.outputs.version != 'unreleased'
53+
if: github.event_name == 'push' && env.BRANCH == 'master' && steps.release_info.outputs.version != 'unreleased'
5354
uses: pypa/gh-action-pypi-publish@master
5455
with:
5556
password: ${{ secrets.pypi_password }}

.github/workflows/release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Create Release
33
on:
44
push:
55
branches:
6-
- main
76
- master
87

98
jobs:
@@ -27,7 +26,7 @@ jobs:
2726
echo "::set-output name=changelog::$changelog"
2827
2928
- name: create release
30-
if: steps.release_info.outputs.version != 'unreleased'
29+
if: github.event_name == 'push' && env.BRANCH == 'master' && steps.release_info.outputs.version != 'unreleased'
3130
uses: actions/create-release@v1
3231
id: create_release
3332
env:

0 commit comments

Comments
 (0)