Skip to content

Commit

Permalink
Switch to using github actions and remove travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathannaz committed Apr 5, 2023
1 parent 2bda0f9 commit c8b8fe4
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 60 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/python-publish.yml
@@ -0,0 +1,45 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
push:
branches:
- "*"

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.7'
- name: Install dependencies
run: |
python setup.py sdist
- name: Publish distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
password: ${{ secrets.PYPI_API_TOKEN }}
# - name: Publish distribution to Test PyPI
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository_url: https://test.pypi.org/legacy/
# skip_existing: true
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
21 changes: 0 additions & 21 deletions .travis.sh

This file was deleted.

35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

4 changes: 4 additions & 0 deletions HISTORY.md
@@ -1,5 +1,9 @@
# Release History

## 0.5.0 (2023-03-31)

- Update python version to 3.7+

## 0.4.1 (2021-01-25)

- Suppress stacktrace logging when hook exits unsuccessfully (See [#23](https://github.com/zillow/battenberg/pull/23))
Expand Down
7 changes: 3 additions & 4 deletions README.md
@@ -1,7 +1,7 @@
# Battenberg

[![image](https://img.shields.io/pypi/v/battenberg.svg)](https://pypi.python.org/pypi/battenberg)
[![image](https://img.shields.io/travis/zillow/battenberg.svg)](https://travis-ci.org/zillow/battenberg)
[![image](https://img.shields.io/travis/zillow/battenberg.svg)](https://github.com/zillow/battenberg/actions)

Battenberg is a tool built atop of [Cookiecutter](https://github.com/audreyr/cookiecutter) to keep Cookiecut projects
in sync with their parent templates. Under the hood, Battenberg relies on Git to manage the merging, diffing, and
Expand Down Expand Up @@ -116,8 +116,7 @@ flake8 --config flake8.cfg battenberg

**Reminder to update [`HISTORY.md`](./HISTORY.md) with a summary of any updates, especially breaking changes.**

We utilize Travis CI's built in [deploy to PyPI](https://docs.travis-ci.com/user/deployment/pypi/) functionality. Specifically
we've limited it to just publish on `git tags`. To release run:
We utilize GitHub Actions to deploy to PyPI. We've limited it to just publish on `git tags`. To release run:

```bash
# Change to the appropriate commit you want to base the release on.
Expand All @@ -126,7 +125,7 @@ git tag <version>
git push origin <version>
```

Then watch Travis CI build for any errors, eventually it should appear on the [`battenberg` PyPI](https://pypi.org/project/battenberg/) project.
Then watch the build for any errors, eventually it should appear on the [`battenberg` PyPI](https://pypi.org/project/battenberg/) project.

## FAQ

Expand Down

0 comments on commit c8b8fe4

Please sign in to comment.