-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from smoia/int/cd
Add Continuous Deployment tools (`auto`, packaging workflows, zenodo)
- Loading branch information
Showing
4 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"plugins": [ | ||
"git-tag", | ||
"conventional-commits", | ||
"first-time-contributor", | ||
"released" | ||
], | ||
"owner": "physiopy", | ||
"repo": "peakdet", | ||
"name": "Stefano Moia", | ||
"email": "[email protected]", | ||
"labels": [ | ||
{ | ||
"name": "Majormod", | ||
"changelogTitle": "💥 Breaking Change", | ||
"description": "This PR breaks compatibility, and increments the major version (+1.0.0)", | ||
"releaseType": "major", | ||
"overwrite": true, | ||
"color": "#05246d" | ||
}, | ||
{ | ||
"name": "Minormod", | ||
"changelogTitle": "🚀 Enhancement", | ||
"description": "This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0)", | ||
"releaseType": "minor", | ||
"overwrite": true, | ||
"color": "#05246d" | ||
}, | ||
{ | ||
"name": "Minormod-breaking", | ||
"changelogTitle": "💥 Breaking Change during development", | ||
"description": "For development only, this PR increments the minor version (0.+1.0) but breaks compatibility", | ||
"releaseType": "minor", | ||
"overwrite": true, | ||
"color": "#05246d" | ||
}, | ||
{ | ||
"name": "BugFIX", | ||
"changelogTitle": "🐛 Bug Fix", | ||
"description": "This PR generally closes a `Bug` issue, and increments the patch version (0.0.+1)", | ||
"releaseType": "patch", | ||
"overwrite": true, | ||
"color": "#d73a4a" | ||
}, | ||
{ | ||
"name": "Documentation", | ||
"changelogTitle": "📝 Documentation", | ||
"description": "This issue or PR is about the documentation ", | ||
"releaseType": "none", | ||
"overwrite": true, | ||
"color": "#1D70CF" | ||
}, | ||
{ | ||
"name": "Testing", | ||
"changelogTitle": "⚠️ Tests", | ||
"description": "This is for testing features, writing tests or producing testing code", | ||
"releaseType": "none", | ||
"overwrite": true, | ||
"color": "#ffb5b4" | ||
}, | ||
{ | ||
"name": "Internal", | ||
"changelogTitle": "🏠 Internal", | ||
"description": "Changes affect the internal API. It doesn't increase the version, but produces a changelog", | ||
"releaseType": "none", | ||
"overwrite": true, | ||
"color": "#ffffff" | ||
}, | ||
{ | ||
"name": "Outreach", | ||
"changelogTitle": "🖋️ Outreach", | ||
"description": "Issue about outreaching of any form", | ||
"releaseType": "none", | ||
"overwrite": true, | ||
"color": "#0e8a16" | ||
}, | ||
{ | ||
"name": "Skip release", | ||
"description": "This PR preserves the current version when merged, and doesn't appear in the changelog", | ||
"releaseType": "skip", | ||
"overwrite": true, | ||
"color": "#ffffff" | ||
}, | ||
{ | ||
"name": "Release", | ||
"description": "For PR only, trigger a release at the merge", | ||
"releaseType": "release", | ||
"overwrite": true, | ||
"color": "#FFFFFF" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This workflows will create a release using auto when a PR is merged in master. | ||
|
||
name: Auto-release on PR merge | ||
|
||
on: | ||
# ATM, this is the closest trigger to a PR merging | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
auto-release: | ||
runs-on: ubuntu-18.04 | ||
# Set skip ci to avoid loops | ||
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | ||
# Set bash as default shell for jobs | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
with: | ||
# Fetch all history for all branches and tags | ||
fetch-depth: 0 | ||
# Use token with write access to the repo | ||
token: ${{ secrets.GH_TOKEN }} | ||
- name: Download and install latest auto | ||
env: | ||
# OS can be linux, macos, or win | ||
OS: linux | ||
# Retrieve URL of latest auto, download it, unzip it, and give exec permissions. | ||
run: | | ||
curl -vkL -o - $( curl -s https://api.github.com/repos/intuit/auto/releases/latest \ | ||
| grep browser_download_url | grep ${OS} | awk -F'"' '{print $4}') \ | ||
| gunzip > ~/auto | ||
chmod a+x ~/auto | ||
- name: Create release without version prefix | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
# Run auto release, don't use 'v' prefix, and be verbose | ||
run: | | ||
~/auto shipit --no-version-prefix -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This workflows will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
name: Upload Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
|
||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.6' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"license": "Apache-2.0", | ||
"title": "physiopy/peakdet: A python toolbox for reproducible physiological data analysis", | ||
"upload_type": "software", | ||
"creators": [ | ||
{ | ||
"affiliation": "McGill University", | ||
"name": "Elizabeth DuPre" | ||
}, | ||
{ | ||
"affiliation": "McGill University", | ||
"name": "Ross Markello" | ||
}, | ||
{ | ||
"orcid": "0000-0002-2553-3327", | ||
"affiliation": "BCBL - Basque Center on Cognition, Brain and Language", | ||
"name": "Stefano Moia" | ||
} | ||
], | ||
"access_right": "open" | ||
} |