Skip to content

Commit

Permalink
bump: version 2.0.3 → 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarcoatl committed Jan 9, 2024
1 parent c462252 commit fe40403
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .cz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ commitizen:
name: cz_conventional_commits
tag_format: v$version
update_changelog_on_bump: true
version: 2.0.3
version: 2.1.0
version_files:
- README.md
version_scheme: semver
10 changes: 1 addition & 9 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
on:
workflow_call:
inputs:
cache:
description: >-
Whether to enable caching.
required: false
type: string
default: 'yes'
pr-create:
description: >-
Whether to create a Pull Request.
Expand Down Expand Up @@ -63,14 +57,12 @@ jobs:
path: deps

- name: Cache pip
if: ${{ inputs.cache == 'yes' }}
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: coatl-dev-pre-commit-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('deps/requirements/base.txt', 'deps/requirements/pre-commit.txt') }}
key: pip-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('deps/requirements/base.txt', 'deps/requirements/pre-commit.txt') }}

- name: Install pre-commit
shell: bash
run: |
python -m pip install --requirement deps/requirements/base.txt
python -m pip install --requirement deps/requirements/pre-commit.txt
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v2.1.0 (2024-01-09)

### Feat

- add pip-compile-upgrade and pre-commit-autoupdate (#18)

## v2.0.3 (2023-12-11)

## v2.0.2 (2023-11-21)
Expand Down
115 changes: 108 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Our main goal is to provide tools for maintainers working on Python 2 projects.

Workflows:

- [pip-compile-upgrade](#githubworkflowspip-compile-upgrade)
- [pre-commit-autoupdate](#githubworkflowspre-commit-autoupdate)
- [pre-commit](#githubworkflowspre-commityml)
- [pylint](#githubworkflowspylintyml)
- [pypi-upload](#githubworkflowspypi-uploadyml)
Expand All @@ -18,6 +20,104 @@ Workflows:
- [tox-gh](#githubworkflowstox-ghyml)
- [tox](#githubworkflowstoxyml)

### .github/workflows/pip-compile-upgrade

GitHub action for running `pip-compile upgrade` on your Python 2 and 3
requirements.

**Inputs**:

- `path` (`string`): A file or location of the requirement file(s).
- `python-version` (`string`): Python version to use for installing `pip-tools`.
You may use MAJOR.MINOR or exact version. Defaults to `'2.7'`. Optional.
- `pr-create` (`string`): Whether to create a Pull Request. Options: `'yes'`,
`'no'`. Defaults to `'yes'`. Optional.
- `pr-commit-message` (`string`): Use the given message as the commit message.
Defaults to `'chore(requirements): pip-compile upgrade'`. Optional.
- `pr-auto-merge` (`string`): Automatically merge only after necessary
requirements are met. Options: `'yes'`, `'no'`. Defaults to `'yes'`. Optional.
- `sign-commits` (`string`): Whether to sign Git commits. Options: `'yes'`,
`'no'`. Defaults to `'yes'`. Optional.

**Secrets**:

- `gh-token` (`secret`): GitHub token. Required when creating PRs, otherwise is
optional.
- `gpg-sign-passphrase` (`secret`): GPG private key passphrase. Required when
signing commits, otherwise is optional.
- `gpg-sign-private-key` (`secret`): GPG private key exported as an ASCII
armored version. Required when signing commits, otherwise is optional.

**Example**:

```yml
name: pip-compile-upgrade

on:
schedule:
- cron: '0 20 * * 1'
workflow_dispatch:

jobs:
pip-compile-upgrade:
uses: coatl-dev/workflows/.github/workflows/pip-compile-upgrade.yml@v2.1.0
with:
path: requirements.txt
secrets:
gh-token: ${{ secrets.GH_TOKEN }}
gpg-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
```
### .github/workflows/pre-commit-autoupdate
If you [cannot/do not want to] benefit from [`pre-commit.ci`], use this workflow
to install Python and invoke [`pre-commit autoupdate`].

**Inputs**:

- `pr-base-branch` (`string`): The branch into which you want your code merged.
Defaults to `'main'`. Required when `pr-create` is set to `'yes'`, otherwise
is optional.
- `pr-create` (`string`): Whether to create a Pull Request. Options: `'yes'`,
`'no'`. Defaults to `'yes'`. Optional.
- `pr-auto-merge` (`string`): Automatically merge only after necessary
requirements are met. Options: `'yes'`, `'no'`. Defaults to `'yes'`. Optional.
- `sign-commits` (`string`): Whether to sign Git commits. Options: `'yes'`,
`'no'`. Defaults to `'yes'`. Optional.
- `skip-repos` (`string`): A list of repos to exclude from autoupdate. The repos
must be separated by a "pipe" character `'|'`. Defaults to `''`. Optional.

**Secrets**:

- `gh-token` (`secret`): GitHub token. Required when creating PRs, otherwise is
optional.
- `gpg-sign-passphrase` (`secret`): GPG private key passphrase. Required when
signing commits, otherwise is optional.
- `gpg-sign-private-key` (`secret`): GPG private key exported as an ASCII
armored version. Required when signing commits, otherwise is optional.

**Example**:

```yml
name: pre-commit-autoupdate
on:
schedule:
- cron: '0 20 * * 1'
workflow_dispatch:
jobs:
pre-commit-autoupdate:
uses: coatl-dev/workflows/.github/workflows/pre-commit-autoupdate.yml@v2.1.0
with:
skip-repos: 'flake8'
secrets:
gh-token: ${{ secrets.GH_TOKEN }}
gpg-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }}
gpg-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
```

### .github/workflows/pre-commit.yml

If you [cannot/do not want to] benefit from [`pre-commit.ci`], use this workflow
Expand All @@ -34,7 +134,7 @@ to install Python and invoke [`pre-commit`].
```yaml
jobs:
main:
uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@v2.0.3
uses: coatl-dev/workflows/.github/workflows/pre-commit.yml@v2.1.0
with:
skip-hooks: 'pylint'
```
Expand All @@ -48,7 +148,7 @@ This workflow will install Python and invoke `pylint` to analyze your code.
```yaml
jobs:
main:
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v2.0.3
uses: coatl-dev/workflows/.github/workflows/pylint.yml@v2.1.0
```

### .github/workflows/pypi-upload.yml
Expand Down Expand Up @@ -78,7 +178,7 @@ Secrets:
```yaml
jobs:
main:
uses: coatl-dev/workflows/.github/workflows/pypi-upload.yml@v2.0.3
uses: coatl-dev/workflows/.github/workflows/pypi-upload.yml@v2.1.0
with:
python-version: '3.11'
secrets:
Expand Down Expand Up @@ -106,7 +206,7 @@ requires =
```yaml
jobs:
main:
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v2.0.3
uses: coatl-dev/workflows/.github/workflows/tox-docker.yml@v2.1.0
```

### .github/workflows/tox-envs.yml
Expand Down Expand Up @@ -138,7 +238,7 @@ requires =
```yaml
jobs:
main:
uses: coatl-dev/workflows/.github/workflows/tox-envs.yml@v2.0.3
uses: coatl-dev/workflows/.github/workflows/tox-envs.yml@v2.1.0
with:
python-versions: '["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]'
```
Expand Down Expand Up @@ -177,7 +277,7 @@ and on your workflow:
```yaml
jobs:
main:
uses: coatl-dev/workflows/.github/workflows/tox-gh.yml@v2.0.3
uses: coatl-dev/workflows/.github/workflows/tox-gh.yml@v2.1.0
with:
python-versions: '["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]'
```
Expand All @@ -192,14 +292,15 @@ This workflow will install Python and invoke `tox` to run all envs found in
```yaml
jobs:
main:
uses: coatl-dev/workflows/.github/workflows/tox.yml@v2.0.3
uses: coatl-dev/workflows/.github/workflows/tox.yml@v2.1.0
```

[`actions/setup-python`]: https://github.com/actions/setup-python
[`coatldev/six:3.11`]: https://hub.docker.com/r/coatldev/six
[`env_list`]: https://tox.wiki/en/latest/config.html#env_list
[`local hooks`]: https://pre-commit.com/#repository-local-hooks
[`pre-commit`]: https://pre-commit.com/
[`pre-commit autoupdate`]: https://pre-commit.com/#pre-commit-autoupdate
[`pre-commit.ci`]: https://pre-commit.ci/
[Temporarily disabling hooks]: https://pre-commit.com/#temporarily-disabling-hooks
[`tox-gh`]: https://github.com/tox-dev/tox-gh
Expand Down

0 comments on commit fe40403

Please sign in to comment.