Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup auto release workflow #313

Merged
merged 6 commits into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"projectOwner": "physiopy",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
"files": [
"README.md"
],
Expand Down
86 changes: 86 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"plugins": [
"git-tag",
"all-contributors",
"conventional-commits",
"first-time-contributor",
"released"
],
"release": {
"prerelease": true
},
"owner": "physiopy",
"repo": "phys2bids",
"name": "Stefano Moia",
"email": "s.moia@bcbl.eu",
"labels": [
{
"name": "Majormod",
"changelogTitle": "💥 Breaking Change",
"description": "This PR breaks compatibility, and increments the major version (+1.0.0)",
"releaseType": "major",
"overwrite": true
},
{
"name": "Minormod",
"changelogTitle": "🚀 Enhancement",
"description": "This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0)",
"releaseType": "minor",
"overwrite": true
},
{
"name": "Minormod-breaking",
Copy link
Member

@tsalo tsalo Oct 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still valid when phys2bids is past alpha (i.e., 1.0.0+)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could remove it, but honestly it' mainly there to maintain the same configuration across physiopy. I doubt we'll ever use that label!

"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
},
{
"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
},
{
"name": "Documentation",
"changelogTitle": "📝 Documentation",
"description": "This issue or PR is about the documentation ",
"releaseType": "none",
"overwrite": true
},
{
"name": "Testing",
"changelogTitle": "⚠️ Tests",
"description": "This is for testing features, writing tests or producing testing code",
"releaseType": "none",
"overwrite": true
},
{
"name": "Internal",
"changelogTitle": "🏠 Internal",
"description": "Changes affect the internal API. It doesn't increase the version, but produces a changelog",
"releaseType": "none",
"overwrite": true
},
{
"name": "Outreach",
"changelogTitle": "🖋️ Outreach",
"description": "Issue about outreaching of any form",
"releaseType": "none",
"overwrite": true
},
{
"name": "Skip release",
"description": "This PR preserves the current version when merged, and doesn't appear in the changelog",
"releaseType": "skip",
"overwrite": true
},
{
"name": "Release",
"description": "For PR only, trigger a release at the merge",
"releaseType": "release",
"overwrite": true
}
]
}
43 changes: 43 additions & 0 deletions .github/workflows/auto-release.yml
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 ultraverbose
run: |
~/auto release --no-version-prefix -vv
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ phys2bids
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3653153.svg)](https://doi.org/10.5281/zenodo.3653153)
[![Join the chat at Gitter: https://gitter.im/physiopy/phys2bids](https://badges.gitter.im/physiopy/phys2bids.svg)](https://gitter.im/physiopy/phys2bids?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge)
[![codecov](https://codecov.io/gh/physiopy/phys2bids/branch/master/graph/badge.svg)](https://codecov.io/gh/physiopy/phys2bids)
[![Auto Release](https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto)](https://github.com/intuit/auto)

[![CircleCI](https://circleci.com/gh/physiopy/phys2bids.svg?branch=master&style=shield)](https://circleci.com/gh/physiopy/phys2bids)
[![Build Status. Windows](https://dev.azure.com/physiopy/phys2bids/_apis/build/status/physiopy.phys2bids?branchName=master)](https://dev.azure.com/physiopy/phys2bids/_build/latest?definitionId=1&branchName=master)
Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ignore:
- "phys2bids/tests"
- "phys2bids/heuristics"
- "phys2bids/due.py"
- ".*rc"
- ".github"

comment:
layout: "reach,diff,flags,tree"
Expand Down
3 changes: 3 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ phys2bids
:target: https://codecov.io/gh/physiopy/phys2bids
:alt: codecov

.. image:: https://img.shields.io/badge/release-auto.svg?colorA=888888&colorB=9B065A&label=auto
:target: https://github.com/intuit/auto
:alt: Auto Release

``phys2bids`` is a python3 library meant to format physiological files in BIDS.
It was born for AcqKnowledge files (BIOPAC), and at the moment it supports
Expand Down