From eb187ca6a7e4a01cff51704b5fceb00a89e82d80 Mon Sep 17 00:00:00 2001 From: Kareem Zidane Date: Mon, 10 Apr 2017 23:29:58 +0200 Subject: [PATCH] deploys on commits to master --- .travis.yml | 24 +++++------------------- Makefile | 16 +++++++--------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index af46af4..48ddeea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,24 +11,10 @@ before_deploy: pip install twine deploy: # create github release - - provider: releases - - # GitHub access token - api_key: - secure: "Hv2ICkPkC7hiRw8GS9adkEcfoYGeVPbGHRNPQdGxLTeP1Mz9x/2ylUprrb2Ohq+pHGRa1W55nSJAZWHto4L/seWS17vN1JB1o71KYeD8h4Ywm/iJzYJFu4v8cmuT9qMPC89GtSGUkEZml+Vd6lb6d/eBr7HWoAMF7LCobzVvpJftgSBqkN1Z0aaunGNRtPVaqf0D4iQMSU1e0X9HFyIsxjS68sNqVcU/eSqbkHQ32COliOdEZXDqNmoJjIq4NYVH7DCS4kSpfxSd3BkJPn1UH4891MntflMllH7khmSA0lqSuunp+olfzhzchYb0/e0LavqYyFU/cRemyt8RBuE0GD3J3TMudVav/5HLKt6/exZwqfv7bHyorDXkkKGJqYNPUCOD2K4RS4ExpUU5c5en5inJZdgKYVI9gZS15oXmKV3H/8JkJPgx0xRP1Rx8niQKezKdFb0dZxArbMBUuAnolgyoq2EgnsNYhboRWXoJP36FCWFn8U8UNUfmgOkkMcP59mZ6svznxWPIyCMhfGgShY03GTvPp94P6c6OZJpjyjmWyPsvGZJrvnRlJ8VxBaUBcfuQl9rtBorwJ3VI1VWguyBaSINM6OWPtEJ0J2oVM/8Dvjuw2qPNkCdUhflc7wV/AUYB9/6rfpjY+GwTEKtZBBw4epbZX/B0L+vdRONZJ0Q=" - - # enable wildcards in filenames - file_glob: true - - # upload sdist - file: dist/* - - # avoid stashing sdist - skip_cleanup: true - - # create releases on tags only + - provider: script + script: make release on: - tags: true + branch: master # deploy to PyPI - provider: script @@ -39,6 +25,6 @@ deploy: # avoid stashing sdist skip_cleanup: true - # deploy on tags only + # deploy on commits to master on: - tags: true + branch: master diff --git a/Makefile b/Makefile index 46935f8..90013c6 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,11 @@ clean: install: build pip3 install dist/*.tar.gz -.PHONY: push -push: - git push origin "v$$(python3 setup.py --version)" - +# used by .travis.yml .PHONY: release -release: tag push - -.PHONY: tag -tag: - git tag "v$$(python3 setup.py --version)" +release: + curl --fail --data "{ \ + \"tag_name\": \"v$$(python setup.py --version)\", \ + \"target_commitish\": \"master\", \ + \"name\": \"v$$(python setup.py --version)\" \ + }" --user bot50:$$GITHUB_TOKEN https://api.github.com/repos/$$TRAVIS_REPO_SLUG/releases