Make sure only to publish packages when merging to master
name: CI
-on: [push, pull_request]
+on:
+ push:
+ branches:
+ - master
jobs:
build:
runs-on: ubuntu-latest
@@ -38,6 +41,7 @@ jobs:
run: |
nbdev_test_nbs
- name: Build and publish
+ if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.test_pypi_password }}
