Skip to content

Commit

Permalink
feat: v1.1.0 and PyPI release (#68)
Browse files Browse the repository at this point in the history
* chore: set pypi name to one that is available

* chore: add pypi release tooling and automation

* feat: bump to v1.1.0

* docs: update readme to reference semver release tags
  • Loading branch information
mattsb42 authored Jun 1, 2020
1 parent 85df648 commit 2df226b
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 5 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/cd_post-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow performs CD tasks after a release has been published.
name: post-release tasks

on:
release:
types: [published]

jobs:
test-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: publish to test-PyPI
env:
TOXENV: test-release
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: tox -- -vv
pypi:
needs: test-pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- run: |
python -m pip install --upgrade pip
pip install --upgrade -r ci-requirements.txt
- name: publish to PyPI
env:
TOXENV: release
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: tox -- -vv
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 1.1.0 -- 2020-05-31

### Features

- Added option to specify GitHub repository as input value.
[#52](https://github.com/mattsb42/repo-manager/pull/52)

## 1.0.0 -- 2020-02-01

Initial release.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The [built-in GitHub Actions token][github actions token] will not work.**
To use `repo-manager`, simply define a step in your workflow, providing your GitHub Token.

```yaml
- uses: mattsb42/repo-manager@master
- uses: mattsb42/repo-manager@v1
with:
github-token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
```
Expand All @@ -48,7 +48,7 @@ If you want to enable debug logging or use a special config file location,
you indicate that with the other input values.
```yaml
- uses: mattsb42/repo-manager@master
- uses: mattsb42/repo-manager@v1
with:
github-token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
config-file: .github/config/repository.yaml
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_requirements():
INSTALL_REQUIRES, DEPENDENCY_LINKS = get_requirements()

setup(
name="repo-manager",
name="github-repo-manager",
version=get_version(),
packages=find_packages("src"),
package_dir={"": "src"},
Expand Down
2 changes: 1 addition & 1 deletion src/repo_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ._util import load_context, load_inputs

__all__ = ("__version__",)
__version__ = "1.0.0"
__version__ = "1.1.0"
_LOGGER = logging.getLogger(__name__)


Expand Down
49 changes: 48 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ passenv =
# Pass through the default AWS region (used for integration tests)
AWS_DEFAULT_REGION \
# Pass through the configuration values for these tests
INPUT_GITHUB-TOKEN INPUT_DEBUG INPUT_CONFIG-FILE GITHUB_TOKEN GITHUB_USER
INPUT_GITHUB-TOKEN INPUT_DEBUG INPUT_CONFIG-FILE GITHUB_TOKEN GITHUB_USER \
# Pass through PyPI variable
PYPI_SECRET_ARN TWINE_PASSWORD
sitepackages = False
deps = -rtest/requirements.txt
commands =
Expand Down Expand Up @@ -236,6 +238,14 @@ commands =
# Release tooling #
###################

[testenv:park]
basepython = python3
skip_install = true
deps =
pypi-parker
setuptools
commands = python setup.py park

[testenv:build]
basepython = python3
skip_install = true
Expand All @@ -244,3 +254,40 @@ deps =
setuptools
commands =
python setup.py bdist_wheel

[testenv:test-release]
basepython = python3
skip_install = true
ignore_errors = false
setenv =
TWINE_REPOSITORY_URL = https://test.pypi.org/legacy/
TWINE_USERNAME = __token__
deps =
{[testenv:park]deps}
{[testenv:build]deps}
twine
whitelist_externals =
rm
commands =
rm -rf {toxinidir}/dist/
{[testenv:park]commands}
{[testenv:build]commands}
twine upload --skip-existing {toxinidir}/dist/*

[testenv:release]
basepython = python3
skip_install = true
ignore_errors = false
setenv =
TWINE_USERNAME = __token__
deps =
{[testenv:park]deps}
{[testenv:build]deps}
twine
whitelist_externals =
rm
commands =
rm -rf {toxinidir}/dist/
{[testenv:park]commands}
{[testenv:build]commands}
twine upload --skip-existing {toxinidir}/dist/*

0 comments on commit 2df226b

Please sign in to comment.