Skip to content

Commit

Permalink
ci: configure semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jerivas committed Sep 9, 2020
1 parent 3ea064f commit bfcc199
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 25 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test and release

# Fires on all incoming commits
on: [push]

jobs:

# Test
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox tox-gh-actions
- name: Run tests
run: tox --parallel
env:
TOX_PARALLEL_NO_SPINNER: 1

# Create a new semantic release
release:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17
extra_plugins: |
@semantic-release/exec@5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
19 changes: 19 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"stable",
{"name": "alpha", "prerelease": true},
{"name": "beta", "prerelease": true},
{"name": "rc", "prerelease": true}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
["@semantic-release/exec", {
"verifyConditionsCmd": "python -m pip install -U pip setuptools wheel twine",
"prepareCmd": "sed -i 's/0.0.dev0/${nextRelease.version}/' mezzanine/__init__.py",
"publishCmd": "python setup.py sdist bdist_wheel && twine upload dist/*"
}]
]
}
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ global-exclude __pycache__
global-exclude *.py[co]
prune .tx
prune tests
exclude .releaserc
2 changes: 1 addition & 1 deletion mezzanine/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.3.1"
__version__ = "0.0.dev0" # Do not edit, managed by semantic-release

0 comments on commit bfcc199

Please sign in to comment.