Skip to content

Commit

Permalink
Merge pull request #27 from con/add-auto
Browse files Browse the repository at this point in the history
Set up auto
  • Loading branch information
yarikoptic authored Feb 22, 2021
2 parents f06c214 + fb77c2f commit 11f339d
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"onlyPublishWithReleaseLabel": true,
"baseBranch": "master",
"author": "auto <auto@nil>",
"noVersionPrefix": true,
"plugins": [
"git-tag",
[
"exec",
{
"afterRelease": "python -m build && twine upload dist/*"
}
]
]
}
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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')"
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: Set up Python
uses: actions/setup-python@v2
with:
python-version: '^3.6'

- name: Install Python dependencies
run: python -m pip install build twine

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

# vim:set sts=2:

0 comments on commit 11f339d

Please sign in to comment.