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

Set up workflow with auto for releasing & PyPI uploads #86

Merged
merged 4 commits into from
Apr 13, 2021
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
7 changes: 7 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"onlyPublishWithReleaseLabel": true,
"baseBranch": "master",
"author": "auto <auto@nil>",
"noVersionPrefix": true,
"plugins": ["git-tag"]
}
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
outputs:
auto-version: ${{ steps.auto-version.outputs.version }}
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Download latest auto
run: |
auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')"
wget -O- "$auto_download_url" | gunzip > ~/auto
chmod a+x ~/auto

- name: Check whether a release is due
id: auto-version
run: |
version="$(~/auto version)"
echo "::set-output name=version::$version"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create release
run: ~/auto shipit
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pypi:
runs-on: ubuntu-latest
needs: auto-release
if: "needs.auto-release.outputs.auto-version != ''"
steps:
# By default, actions/checkout will checkout the commit that that was
# pushed to master and triggered the workflow, but this does not include
# the commit & tag created by `auto`. In order to get that, we need to
# look up the tag for the latest release.
- name: Get tag of latest release
id: latest-release
run: |
latest_tag="$(curl -fsSL https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r .tag_name)"
echo "::set-output name=tag::$latest_tag"

- name: Checkout source
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ steps.latest-release.outputs.tag }}

- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.6

- name: Install build & twine
run: python -m pip install build twine

- name: Build
run: python -m build

- name: Upload
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

# vim:set et sts=2:
39 changes: 14 additions & 25 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,61 @@
____ _ _ _
| _ \ __ _ | |_ __ _ | | __ _ __| |
| | | | / _` | | __| / _` | | | / _` | / _` |
| |_| | | (_| | | |_ | (_| | | |___ | (_| | | (_| |
|____/ \__,_| \__| \__,_| |_____| \__,_| \__,_|
Crawler

This is a high level and scarce summary of the changes between releases. We
would recommend to consult log of the [DataLad git
repository](http://github.com/datalad/datalad-crawler) for more details.

## 0.8.2 (Mar 19, 2021) -- Hunt the corpses
# 0.8.2 (Mar 19, 2021) -- Hunt the corpses

- RF: Replace custom SafeConfigParserWithIncludes with standard ConfigParser
- BF: gh - handle situation when cloned repo is still empty

## 0.8.1 (Feb 25, 2021) -- Pay the price
# 0.8.1 (Feb 25, 2021) -- Pay the price

- Fix up use of protected datalad's interface for auth to github.
Boosted DataLad version dependency to 0.13.6

## 0.8.0 (Jan 03, 2021) -- Good as New
# 0.8.0 (Jan 03, 2021) -- Good as New

- Making compatible with recent DataLad by using new WitlessRunner and
not older unused features.

## 0.7.0 (Nov 20, 2020) -- Cherish the moment
# 0.7.0 (Nov 20, 2020) -- Cherish the moment

- RF: stop using `_{git,annex}_custom_command` to allow DataLad core
progress forward without "breaking" the crawler

## 0.6.0 (Jul 13, 2020) -- Honoring Kyle (who never adds a release "name")
# 0.6.0 (Jul 13, 2020) -- Honoring Kyle (who never adds a release "name")

- ENH: fix enabling special remotes when working ith recent (as of 202006)
git-annex
- NF: gh (for github) and xnat crawler pipelines

## 0.5.0 (Feb 27, 2020) -- Future is bright
# 0.5.0 (Feb 27, 2020) -- Future is bright

- DataLad 0.12 is now minimal version. Codebase is now compatible with current
DataLad 0.12.2-293-gd5fcb4833
- uses less of GitPython functionality
- OpenfMRI pipeline tests "relaxed" (no commit counts etc)
- s3 node - be robust in case of no previous version-id known

## 0.4.4 (Nov 20, 2019) -- ... despite some mocking
# 0.4.4 (Nov 20, 2019) -- ... despite some mocking

- ENH: `s3_simple` pipeline got additional option `drop_immediately` to
drop files immediately upon having them annexed
- RF: `mock` is explicitly listed as a dependency for testing since DataLad
0.12.x will be PY3 only and could use built-in `unittest.mock`

## 0.4.3 (Oct 30, 2019) -- ... and help each other
# 0.4.3 (Oct 30, 2019) -- ... and help each other

- MNT: More changes for compatibility with developmental DataLad (#62)

## 0.4.2 (Oct 30, 2019) -- Friends should stick together ...
# 0.4.2 (Oct 30, 2019) -- Friends should stick together ...

- BF: Prevent sorting error on missing attribute (#45)
- BF: enclose "if else" into () since it has lower precedence than + (#43)
- MNT: Adjust imports for compatibility with developmental DataLad (#53)
- MNT: Update save() call for compatibility with new save (#42)

## 0.4.1 (Jun 20, 2019) -- Let us all stay friends
# 0.4.1 (Jun 20, 2019) -- Let us all stay friends

- Compatibility layer with 0.12 series of DataLad changing API
(no backend option for `create`)

## 0.4 (Mar 14, 2019) -- There is more to life than a Pi
# 0.4 (Mar 14, 2019) -- There is more to life than a Pi

Primarily a variety of fixes and small enhancements. The only notable
change is stripping away testing/support of git-annex direct mode.
Expand All @@ -79,7 +68,7 @@ change is stripping away testing/support of git-annex direct mode.
- skip (but warn if relevant) records without xml
- do not crash while saving updated crawler's URL db to the file which is annexed.

## 0.3 (Feb 06, 2019) -- Happy New Year
# 0.3 (Feb 06, 2019) -- Happy New Year

Primarily a variety of fixes

Expand All @@ -98,13 +87,13 @@ Primarily a variety of fixes
- variety of tests lost their `@known_failure_v6` and now tollerant
to upcoming datalad 0.11.2

## 0.2 (May 17, 2018) -- The other Release
# 0.2 (May 17, 2018) -- The other Release

- All non-master branches in the pipelines now will initiate from master
branch, not detached. That should allow to inherit .gitattributes
settings of the entire dataset

## 0.1 (May 11, 2018) -- The Release
# 0.1 (May 11, 2018) -- The Release

- First release as a DataLad extension. Functionality remains identical
to DataLad 0.10.0.rc2
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include formatters.py setup_support.py