Skip to content

Commit

Permalink
Release Preperation (Yelp#513)
Browse files Browse the repository at this point in the history
* Add upgrade file

* Update change log for new release

* Update change log

* Update links in changelog and remove noop upgrade file

* Add pypi github action

* Update pre-commit version in README

* Deploy using py38 as this is the current stable version of py

* Use build to build tar and wheels

* Remove pip install and upgrade from deploy since already done in tox

* Remove build package call and use setup.py to create dist and wheels

* Update description-file and wheels since they are deprecated

* Remove upload-to-pypi script and documentation for upgrading

Co-authored-by: John-Paul Dakran <[email protected]>
  • Loading branch information
jpdakran and John-Paul Dakran authored Feb 16, 2022
1 parent bb8b615 commit ce45c2b
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 156 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will upload a Python Package using Twine when a new tag is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: detect-secrets-pypi

on:
push:
tags:
- v*

jobs:

tox:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.6', '3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: python -m pip install --upgrade setuptools pip tox virtualenv
# Run tox only for the installed py version on the runner as outlined in the python matrix
# Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini
- run: tox -e py
- run: tox -e mypy

deploy:
# Run tests beforing deploying to pypi
needs: tox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/[email protected]
with:
password: ${{ secrets.pypi_password }}
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,49 @@ If you love `detect-secrets`, please star our project on GitHub to show your sup
### Unreleased
-->

### v1.2.0
##### February 10th, 2022

#### :mega: Release Highlights
- Continous integration github action added ([#506])
- Release pipeline github action added ([#513])

#### :tada: New Features

- New GitHub token plugin added ([#465])
- New SendGrid plugin added ([#463])
- More new ignored file extensions

#### :bug: Bugfixes
- Fixes catastrophic backtracking for indirect reference heuristic ([#509])
- Fixes pre-commit hook secret equality checking causing updates to baseline with no real changes - only a timestamp update ([#507])
- Fixes python 3.8 failing to load plugins on windows and macos ([#505])
- Fixes yaml transformer inline dicitonary index out of bounds exceptions ([#501])
- Fixes regex for slack url ([#477])
- Fixes `AttributeError: 'PotentialSecret' object has no attribute 'line_number'` by safely falling back to 0 if line_number isn't present. ([#476])([#472])
- Fixes gibberish-detector current version
- Fixes filtering ordering in .secrets.baseline

#### :snake: Miscellaneous

- Updated README due hook failing to interpret filenames with spaces ([#470])
- Add CI github action badge to README
- Development dependency bumps ([#519])

[#463]: https://github.com/Yelp/detect-secrets/pull/463
[#465]: https://github.com/Yelp/detect-secrets/pull/465
[#470]: https://github.com/Yelp/detect-secrets/pull/470
[#472]: https://github.com/Yelp/detect-secrets/pull/472
[#476]: https://github.com/Yelp/detect-secrets/pull/476
[#477]: https://github.com/Yelp/detect-secrets/pull/477
[#501]: https://github.com/Yelp/detect-secrets/pull/501
[#505]: https://github.com/Yelp/detect-secrets/pull/505
[#506]: https://github.com/Yelp/detect-secrets/pull/506
[#507]: https://github.com/Yelp/detect-secrets/pull/507
[#509]: https://github.com/Yelp/detect-secrets/pull/509
[#513]: https://github.com/Yelp/detect-secrets/pull/513
[#519]: https://github.com/Yelp/detect-secrets/pull/519

### v1.1.0
##### April 14th, 2021

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ We recommend setting this up as a pre-commit hook. One way to do this is by usin
# .pre-commit-config.yaml
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.0.0
rev: v1.2.0
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
Expand Down
9 changes: 2 additions & 7 deletions docs/upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,5 @@ scripts/bump-version

### Pushing to PyPi

```bash
# First, test with test.pypi.com
scripts/upload-to-pypi

# If all looks good, we can head to prod!
scripts/upload-to-pypi --prod
```
Once the tag from `scripts/bump-version` has been created and pushed to the repository, the pypi
github action will automatically start and publish the package to pypi.
144 changes: 0 additions & 144 deletions scripts/upload-to-pypi

This file was deleted.

5 changes: 1 addition & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ commit = True
tag = True

[metadata]
description-file = README.md

[wheel]
universal = True
description_file = README.md

[bumpversion:file:detect_secrets/__version__.py]
search = VERSION = '{current_version}'
Expand Down

0 comments on commit ce45c2b

Please sign in to comment.