Skip to content

Commit

Permalink
feat!: v8 (#619)
Browse files Browse the repository at this point in the history
* feat!: 8.0.x (#538)

Co-authored-by: Johan <johanhmr@gmail.com>
Co-authored-by: U-NEO\johan <johan.hammar@ombea.com>

* fix: correct Dockerfile CLI command and GHA fetch

* fix: resolve branch checkout logic in GHA

* fix: remove commit amending behaviour

this was not working when there were no source code changes to be made, as it lead
to attempting to amend a HEAD commit that wasn't produced by PSR

* 8.0.0-alpha.1

Automatically generated by python-semantic-release

* fix: correct logic for generating release notes (#550)

* fix: cleanup comments and unused logic

* fix(action): mark container fs as safe for git to operate on

* style: beautify 49080c5

* fix(action): quotation for git config command

* 8.0.0-alpha.2

Automatically generated by python-semantic-release

* fix: resolve bug in changelog logic, enable upload to pypi

* 8.0.0-alpha.3

Automatically generated by python-semantic-release

* test: add tests for ReleaseHistory.release

* fix: resolve loss of tag_format configuration

* 8.0.0-alpha.4

Automatically generated by python-semantic-release

* feat: various improvements

* Added sorting to test parameterisation, so that pytest-xdist works again - dramatic speedup for testing
* Reworked the CI verification code so it's a bit prettier
* Added more testing for the version CLI command, and split some logic out of the command itself
* Removed a redundant double-regex match in VersionTranslator and Version, for some speedup

* chore(test): proper env patching for tests in CI

* style: beautify bcb27a4

* refactor!: remove verify-ci command

* 8.0.0-alpha.5

Automatically generated by python-semantic-release

* fix(docs): fixup docs and remove reference to dist publication

* feat!: remove publication of dists to artefact repository

* feat: rename 'upload' configuration section to 'publish'

* feat!: removed build status checking

* feat: add GitHub Actions output

* fix(action): remove default for 'force'

* fix(ci): different workflow for v8

* fix(action): correct input parsing

* fix: correct handling of build commands

* feat: make it easier to access commit messages in ParsedCommits

* fix: make additional attributes available for template authors

* fix: add logging for token auth, use token for push

* ci: add verbosity

* fix: caching for repo owner and name

* ci: contents permission for workflow

* 8.0.0-alpha.6

Automatically generated by python-semantic-release

* docs: update docs with additional required permissions

* feat: add option to specify tag to publish to in publish command

* feat: add Strict Mode

* docs: convert to Furo theme

* feat: add --skip-build option

* 8.0.0-alpha.7

Automatically generated by python-semantic-release

* test: separate command line tests by stdout and stderr

* ci: pass tag output and conditionally execute publish steps

* fix: correct assets type in configuration (#603)

* change raw config assets type

* fix: correct assets type-annotation for RuntimeContext

---------

Co-authored-by: Bernard Cooke <bernard-cooke@hotmail.com>

* 8.0.0-alpha.8

Automatically generated by python-semantic-release

* fix: pin Debian version in Dockerfile

* feat: promote to rc

* 8.0.0-rc.1

Automatically generated by python-semantic-release

* ci: fix conditionals in workflow and update documentation

* ci: correct conditionals

* fix: only call Github Action output callback once defaults are set

* 8.0.0-rc.2

Automatically generated by python-semantic-release

* fix: create_or_update_release for Gitlab hvcs

* ci: remove separate v8 workflow

* chore: tweak issue templates

* chore: bump docs dependencies

* 8.0.0-rc.3

Automatically generated by python-semantic-release

* fix(deps): add types-click, and downgrade sphinx/furo for 3.7

* 8.0.0-rc.4

Automatically generated by python-semantic-release

* docs: fix typo (#623)

* docs: correct typo in docs/changelog_templates.rst

Co-authored-by: Micael Jarniac <micael@jarniac.com>

---------

Co-authored-by: Johan <johanhmr@gmail.com>
Co-authored-by: U-NEO\johan <johan.hammar@ombea.com>
Co-authored-by: semantic-release <semantic-release>
Co-authored-by: github-actions <action@github.com>
Co-authored-by: smeng9 <38666763+smeng9@users.noreply.github.com>
Co-authored-by: Micael Jarniac <micael@jarniac.com>
  • Loading branch information
6 people committed Jul 16, 2023
1 parent c633414 commit ec30564
Show file tree
Hide file tree
Showing 184 changed files with 20,108 additions and 10,636 deletions.
8 changes: 8 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Separate config file because flake8 is doesn't want to use pyproject.toml
# for config - https://github.com/PyCQA/flake8/issues/234
[flake8]
max-line-length = 88
per-file-ignores =
# Imported but unusued
*/__init__.py = F401
*/__main__.py = F401
42 changes: 36 additions & 6 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,50 @@
---
name: Bug report
about: Something isn't working properly
title: ''
title: ""
labels: bug
assignees: ''

assignees: ""
---

## The problem

*A clear and concise description of what the bug is.*
_A clear and concise description of what the bug is._

## Expected behavior

*A short description of what you expected to happen.*
_A short description of what you expected to happen._

## Environment

Please state which OS you are using and provide the output of the following commands:

```shell
python --version
pip --version
semantic-release --version
pip freeze
```

Please also indicate which Python build tool(s) you are using (e.g. `pip`, `build`,
`poetry`, etc.), including the version number too.

## Configuration

Please add your `semantic-release` configuration, and if applicable also provide
your `build-system` configuration from `pyproject.toml`.

## Logs

Please provide debug logs for the command you are using with the `-vv` flag, e.g.

```shell
semantic-release -vv version
```

If using GitHub actions, ensure the `root_options` contains the `-vv` flag
for verbosity, and attach your workflow definition.

## Additional context

*Add any other information that could be useful, such as your configuration file or an example commit.*
_Add any other information that could be useful, such as a link to your project
(if public), links to a failing GitHub Action, or an example commit._
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Documentation
about: I found an error or gap in the docs
title: ''
title: ""
labels: docs
assignees: danth

assignees: ""
---

*Please describe your problem. Include links to any relevant pages or files.*
_Please describe your problem. Include links to any relevant pages or files._
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
---
name: Question
about: I have a question about Python Semantic Release
title: ''
title: ""
labels: question
assignees: ''

assignees: ""
---


60 changes: 47 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
---
name: Test & Release

on:
push:
branches:
- master
- "8.0.x"

jobs:
test:
name: Python ${{ matrix.python-version }} tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]

steps:
- uses: actions/checkout@v3
Expand All @@ -24,7 +26,7 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
Expand All @@ -34,7 +36,7 @@ jobs:
python -m pip install pytest-github-actions-annotate-failures
- name: pytest
run: python -m pytest -v tests
run: PYTHONHASHSEED=123345 python -m pytest -v tests

mypy:
runs-on: ubuntu-latest
Expand All @@ -54,9 +56,12 @@ jobs:
name: Beautify
runs-on: ubuntu-latest
concurrency: push
needs: [test, mypy]
needs: [ test, mypy ]
outputs:
new_sha: ${{ steps.sha.outputs.SHA }}
permissions:
id-token: write
contents: write

steps:
- name: Set up Python 3.9
Expand All @@ -74,10 +79,11 @@ jobs:
run: python -m black .

- name: Install isort
run: python -m pip install "isort >=4,<5"

run: python -m pip install "isort >=5,<6"
# https://pycqa.github.io/isort/docs/upgrade_guides/5.0.0.html
# removed deprecated "-rc" and "-y" arguments
- name: Sort imports
run: python -m isort -y -rc .
run: python -m isort .

- name: Commit and push changes
uses: github-actions-x/commit@v2.9
Expand All @@ -97,19 +103,47 @@ jobs:
name: Semantic Release
runs-on: ubuntu-latest
concurrency: push
needs: [test, mypy, beautify]
needs: [ test, mypy, beautify ]
if: github.repository == 'python-semantic-release/python-semantic-release'
permissions:
# https://docs.github.com/en/rest/overview/permissions-required-for-github-apps?apiVersion=2022-11-28#metadata
id-token: write
contents: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ needs.beautify.outputs.new_sha }}
- name: Fetch master
run: git fetch --prune origin +refs/heads/master:refs/remotes/origin/master
ref: ${{ github.ref_name }}
- name: Python Semantic Release
id: release
uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: ${{ secrets.PYPI_USERNAME }}
repository_password: ${{ secrets.PYPI_PASSWORD }}
root_options: "-vv"

# https://github.com/pypa/gh-action-pypi-publish#specifying-a-different-username
# This will need converting to use trusted publishing at a later date
# see https://docs.pypi.org/trusted-publishers/
- name: Publish package distributions to PyPI
id: pypi-publish

# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}

- name: Publish package distributions to GitHub Releases
id: github-release

# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'
uses: python-semantic-release/upload-to-gh-release@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Checks

on:
Expand All @@ -23,7 +24,7 @@ jobs:
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
Expand All @@ -33,7 +34,7 @@ jobs:
python -m pip install pytest-github-actions-annotate-failures
- name: pytest
run: python -m pytest -v tests
run: PYTHONHASHSEED=123345 python -m pytest -v tests

mypy:
runs-on: ubuntu-latest
Expand Down

0 comments on commit ec30564

Please sign in to comment.