Skip to content

Commit

Permalink
Merge pull request #54 from cs50/deployment
Browse files Browse the repository at this point in the history
deploys on commits to master
  • Loading branch information
kzidane authored Apr 10, 2017
2 parents d5f2942 + eb187ca commit b834518
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
24 changes: 5 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b834518

Please sign in to comment.