Skip to content

Commit 747274d

Browse files
committed
Set up auto and bump2version
1 parent a1f63de commit 747274d

File tree

5 files changed

+68
-34
lines changed

5 files changed

+68
-34
lines changed

.autorc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"onlyPublishWithReleaseLabel": true,
3+
"baseBranch": "master",
4+
"author": "auto <auto@nil>",
5+
"noVersionPrefix": false,
6+
"plugins": [
7+
"git-tag",
8+
[
9+
"exec",
10+
{
11+
"afterChangelog": "bump2version \"$(printf '%s\n' \"$ARG_0\" | jq -r .bump)\"",
12+
"afterRelease": "python -m build && twine upload dist/*"
13+
}
14+
]
15+
]
16+
}

.bumpversion.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[bumpversion]
2+
current_version = 0.10.0
3+
commit = True
4+
message = [skip ci] Bump version: {current_version} → {new_version}
5+
tag = False
6+
7+
[bumpversion:file:heudiconv/info.py]
8+
[bumpversion:file:docs/conf.py]
9+
[bumpversion:file:docs/installation.rst]
10+
[bumpversion:file:docs/usage.rst]

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Auto-release on PR merge
2+
3+
on:
4+
# ATM, this is the closest trigger to a PR merging
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
auto-release:
11+
runs-on: ubuntu-latest
12+
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
13+
steps:
14+
- name: Checkout source
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Download auto
20+
run: |
21+
#curl -vL -o - "$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" | gunzip > ~/auto
22+
# Pin to 10.16.1 so we don't break if & when
23+
# <https://github.com/intuit/auto/issues/1778> is fixed.
24+
wget -O- https://github.com/intuit/auto/releases/download/v10.16.1/auto-linux.gz | gunzip > ~/auto
25+
chmod a+x ~/auto
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: '^3.7'
31+
32+
- name: Install Python dependencies
33+
run: python -m pip install build bump2version twine
34+
35+
- name: Create release
36+
run: ~/auto shipit
37+
env:
38+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
TWINE_USERNAME: __token__
40+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
41+
42+
# vim:set sts=2:

Makefile

Lines changed: 0 additions & 18 deletions
This file was deleted.

utils/prep_release

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)