diff --git a/.github/workflows/cd_release.yml b/.github/workflows/cd_release.yml index d6062eef..7be32d34 100644 --- a/.github/workflows/cd_release.yml +++ b/.github/workflows/cd_release.yml @@ -198,7 +198,7 @@ jobs: if [ -n "${{ inputs.build_libs }}" ]; then pip install ${{ inputs.build_libs }} fi - pip install git+https://github.com/SINTEF/ci-cd.git@v2.7.4 + pip install git+https://github.com/SINTEF/ci-cd.git@v2.8.0 - name: Parse changelog configuration run: | diff --git a/.github/workflows/ci_cd_updated_default_branch.yml b/.github/workflows/ci_cd_updated_default_branch.yml index 56bc383d..1acccb52 100644 --- a/.github/workflows/ci_cd_updated_default_branch.yml +++ b/.github/workflows/ci_cd_updated_default_branch.yml @@ -236,7 +236,7 @@ jobs: python -m pip install --upgrade pip pip install -U setuptools wheel pip install ${EDITABLE}.${{ inputs.doc_extras }} - pip install git+https://github.com/SINTEF/ci-cd.git@v2.7.4 + pip install git+https://github.com/SINTEF/ci-cd.git@v2.8.0 INSTALLED_PACKAGES=$(pip freeze) if [ "${{ inputs.docs_framework }}" == "mkdocs" ]; then diff --git a/.github/workflows/ci_check_pyproject_dependencies.yml b/.github/workflows/ci_check_pyproject_dependencies.yml index 0284afc0..8766b14a 100644 --- a/.github/workflows/ci_check_pyproject_dependencies.yml +++ b/.github/workflows/ci_check_pyproject_dependencies.yml @@ -137,7 +137,7 @@ jobs: python -m pip install -U ${VERBOSE} pip pip install -U ${VERBOSE} setuptools wheel pip install ${VERBOSE} .${{ inputs.install_extras }} - pip install ${VERBOSE} git+https://github.com/SINTEF/ci-cd.git@v2.7.4 + pip install ${VERBOSE} git+https://github.com/SINTEF/ci-cd.git@v2.8.0 - name: Set up git user run: | diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index aac90671..e1baa27d 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -391,7 +391,7 @@ jobs: python -m pip install -U pip pip install -U setuptools wheel pip install ${EDITABLE}.${{ inputs.install_extras }} - pip install git+https://github.com/SINTEF/ci-cd.git@v2.7.4 + pip install git+https://github.com/SINTEF/ci-cd.git@v2.8.0 - name: Update API Reference if: env.framework == 'mkdocs' && inputs.update_python_api_ref diff --git a/CHANGELOG.md b/CHANGELOG.md index b239d6e7..aad02f18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,54 @@ # Changelog +## [Unreleased](https://github.com/SINTEF/ci-cd/tree/HEAD) + +[Full Changelog](https://github.com/SINTEF/ci-cd/compare/v2.8.0...HEAD) + +# Support Trusted Publishers from PyPI + +[Trusted Publishers](https://docs.pypi.org/trusted-publishers/using-a-publisher/) from [PyPI](https://pypi.org) is now supported via uploading the distribution(s) as artifacts (for more information about GitHub Actions artifacts, see [the GitHub Docs](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts)). + +**Breaking change**: This is not a "true" breaking change - but it may cause certain workflows to fail that uses the callable workflow _CD - Release_: The parameter `publish_on_pypi` has become required, meaning one _must_ provide it in the `with` section of the calling workflow. For more information, see [the documentation page for the _CD - Release_ workflow](https://sintef.github.io/ci-cd/2.8.0/workflows/cd_release/). + +## DX updates + +Several fixes from the development tools have been implemented into the code base. + +## [v2.8.0](https://github.com/SINTEF/ci-cd/tree/v2.8.0) (2024-07-29) + +[Full Changelog](https://github.com/SINTEF/ci-cd/compare/v2.7.4...v2.8.0) + +# Support Trusted Publishers from PyPI + +[Trusted Publishers](https://docs.pypi.org/trusted-publishers/using-a-publisher/) from [PyPI](https://pypi.org) is now supported via uploading the distribution(s) as artifacts (for more information about GitHub Actions artifacts, see [the GitHub Docs](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts)). + +**Breaking change**: This is not a "true" breaking change - but it may cause certain workflows to fail that uses the callable workflow _CD - Release_: The parameter `publish_on_pypi` has become required, meaning one _must_ provide it in the `with` section of the calling workflow. For more information, see [the documentation page for the _CD - Release_ workflow](https://sintef.github.io/ci-cd/2.8.0/workflows/cd_release/). + +## DX updates + +Several fixes from the development tools have been implemented into the code base. + +**Implemented enhancements:** + +- Support new PyPI Trusted Publisher [\#180](https://github.com/SINTEF/ci-cd/issues/180) + +**Merged pull requests:** + +- \[pre-commit.ci\] pre-commit autoupdate [\#268](https://github.com/SINTEF/ci-cd/pull/268) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- Push for PyPI Trusted Publisher usage [\#267](https://github.com/SINTEF/ci-cd/pull/267) ([CasperWA](https://github.com/CasperWA)) +- \[pre-commit.ci\] pre-commit autoupdate [\#266](https://github.com/SINTEF/ci-cd/pull/266) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- \[Auto-generated\] Update dependencies [\#265](https://github.com/SINTEF/ci-cd/pull/265) ([TEAM4-0](https://github.com/TEAM4-0)) +- \[pre-commit.ci\] pre-commit autoupdate [\#264](https://github.com/SINTEF/ci-cd/pull/264) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- \[pre-commit.ci\] pre-commit autoupdate [\#263](https://github.com/SINTEF/ci-cd/pull/263) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- \[Auto-generated\] Update dependencies [\#262](https://github.com/SINTEF/ci-cd/pull/262) ([TEAM4-0](https://github.com/TEAM4-0)) +- \[pre-commit.ci\] pre-commit autoupdate [\#261](https://github.com/SINTEF/ci-cd/pull/261) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- \[pre-commit.ci\] pre-commit autoupdate [\#259](https://github.com/SINTEF/ci-cd/pull/259) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- \[pre-commit.ci\] pre-commit autoupdate [\#257](https://github.com/SINTEF/ci-cd/pull/257) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- \[Auto-generated\] Update dependencies [\#255](https://github.com/SINTEF/ci-cd/pull/255) ([TEAM4-0](https://github.com/TEAM4-0)) +- \[pre-commit.ci\] pre-commit autoupdate [\#254](https://github.com/SINTEF/ci-cd/pull/254) ([pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci)) +- \[Auto-generated\] Update dependencies [\#250](https://github.com/SINTEF/ci-cd/pull/250) ([TEAM4-0](https://github.com/TEAM4-0)) +- \[Auto-generated\] Update dependencies [\#247](https://github.com/SINTEF/ci-cd/pull/247) ([TEAM4-0](https://github.com/TEAM4-0)) + ## [v2.7.4](https://github.com/SINTEF/ci-cd/tree/v2.7.4) (2024-02-29) [Full Changelog](https://github.com/SINTEF/ci-cd/compare/v2.7.3...v2.7.4) diff --git a/ci_cd/__init__.py b/ci_cd/__init__.py index 93c66a69..e685e04e 100644 --- a/ci_cd/__init__.py +++ b/ci_cd/__init__.py @@ -4,7 +4,7 @@ import logging -__version__ = "2.7.4" +__version__ = "2.8.0" __author__ = "Casper Welzel Andersen" __author_email__ = "casper.w.andersen@sintef.no" diff --git a/docs/hooks/docs_api_reference.md b/docs/hooks/docs_api_reference.md index f440fa64..aeea5365 100644 --- a/docs/hooks/docs_api_reference.md +++ b/docs/hooks/docs_api_reference.md @@ -58,7 +58,7 @@ It is meant to be complete as is. ```yaml repos: - repo: https://github.com/SINTEF/ci-cd - rev: v2.7.4 + rev: v2.8.0 hooks: - id: docs-api-reference args: diff --git a/docs/hooks/docs_landing_page.md b/docs/hooks/docs_landing_page.md index 0b2586f7..f41edf4c 100644 --- a/docs/hooks/docs_landing_page.md +++ b/docs/hooks/docs_landing_page.md @@ -32,7 +32,7 @@ It is meant to be complete as is. ```yaml repos: - repo: https://github.com/SINTEF/ci-cd - rev: v2.7.4 + rev: v2.8.0 hooks: - id: docs-landing-page args: diff --git a/docs/hooks/update_pyproject.md b/docs/hooks/update_pyproject.md index 3f4eaeb0..b21ed79c 100644 --- a/docs/hooks/update_pyproject.md +++ b/docs/hooks/update_pyproject.md @@ -66,7 +66,7 @@ It is meant to be complete as is. ```yaml repos: - repo: https://github.com/SINTEF/ci-cd - rev: v2.7.4 + rev: v2.8.0 hooks: - id: update-pyproject args: diff --git a/docs/index.md b/docs/index.md index 36562594..ee333424 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,6 @@ # CI/CD tools -**Current version to use:** `v2.7.4` +**Current version to use:** `v2.8.0` !!! warning "Important" The default for `publish_on_pypi` in the [_CD - Release_ workflow](./workflows/cd_release.md) has changed from `true` to `false` in version `2.8.0`. diff --git a/docs/workflows/cd_release.md b/docs/workflows/cd_release.md index 712f76c1..462fa240 100644 --- a/docs/workflows/cd_release.md +++ b/docs/workflows/cd_release.md @@ -63,7 +63,7 @@ jobs: build: name: Build distribution & publish documentation if: github.repository == 'SINTEF/my-python-package' && startsWith(github.ref, 'refs/tags/v') - uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.8.0 with: # General git_username: "Casper Welzel Andersen" @@ -120,7 +120,7 @@ jobs: The content of repository files can be updated to use the new version where necessary. This is done through the `version_update_changes` (and `version_update_changes_separator`) inputs. -To see an example of how to use the `version_update_changes` (and `version_update_changes_separator`) see for example the [workflow used by the SINTEF/ci-cd repository](https://github.com/SINTEF/ci-cd/blob/v2.7.4/.github/workflows/_local_cd_release.yml) calling the _CD Release_ workflow. +To see an example of how to use the `version_update_changes` (and `version_update_changes_separator`) see for example the [workflow used by the SINTEF/ci-cd repository](https://github.com/SINTEF/ci-cd/blob/v2.8.0/.github/workflows/_local_cd_release.yml) calling the _CD Release_ workflow. Some notes to consider and respect when using `version_update_changes` are: @@ -232,7 +232,7 @@ on: jobs: publish: name: Publish package and documentation - uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/cd_release.yml@v2.8.0 if: github.repository == 'SINTEF/my-python-package' && startsWith(github.ref, 'refs/tags/v') with: # General diff --git a/docs/workflows/ci_automerge_prs.md b/docs/workflows/ci_automerge_prs.md index 0edb8997..ceb60ec2 100644 --- a/docs/workflows/ci_automerge_prs.md +++ b/docs/workflows/ci_automerge_prs.md @@ -55,7 +55,7 @@ on: jobs: update-dependency-branch: name: Call external workflow - uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.8.0 if: github.repository_owner == 'SINTEF' && ( ( startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]' ) || ( github.event.pull_request.head.ref == 'ci/update-pyproject' && github.actor == 'CasperWA' ) ) secrets: PAT: ${{ secrets.RELEASE_PAT }} @@ -76,7 +76,7 @@ on: jobs: update-dependency-branch: name: Call external workflow - uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.8.0 if: github.repository_owner == 'SINTEF' && ( ( startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]' ) || ( github.event.pull_request.head.ref == 'ci/update-pyproject' && github.actor == 'CasperWA' ) ) with: perform_changes: true @@ -100,7 +100,7 @@ on: jobs: update-dependency-branch: name: Call external workflow - uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_automerge_prs.yml@v2.8.0 if: github.repository_owner == 'SINTEF' && ( ( startsWith(github.event.pull_request.head.ref, 'dependabot/') && github.actor == 'dependabot[bot]' ) || ( github.event.pull_request.head.ref == 'ci/update-pyproject' && github.actor == 'CasperWA' ) ) with: perform_changes: true diff --git a/docs/workflows/ci_cd_updated_default_branch.md b/docs/workflows/ci_cd_updated_default_branch.md index a9c7ddb9..b52f9257 100644 --- a/docs/workflows/ci_cd_updated_default_branch.md +++ b/docs/workflows/ci_cd_updated_default_branch.md @@ -103,7 +103,7 @@ on: jobs: updates-to-stable: name: Call external workflow - uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_cd_updated_default_branch.yml@v2.8.0 if: github.repository_owner == 'SINTEF' with: git_username: "Casper Welzel Andersen" diff --git a/docs/workflows/ci_check_pyproject_dependencies.md b/docs/workflows/ci_check_pyproject_dependencies.md index acc06e8e..026a7da6 100644 --- a/docs/workflows/ci_check_pyproject_dependencies.md +++ b/docs/workflows/ci_check_pyproject_dependencies.md @@ -37,7 +37,7 @@ Here is an example of different lines given as value for the `ignore` option tha # ... jobs: check-dependencies: - uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.8.0 with: # ... # For Sphinx, ignore all updates for/from version 4.5.0 and up / keep the minimum version for Sphinx at 4.5.0. @@ -96,7 +96,7 @@ on: jobs: check-dependencies: name: Call external workflow - uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_check_pyproject_dependencies.yml@v2.8.0 if: github.repository_owner == 'SINTEF' with: git_username: "Casper Welzel Andersen" diff --git a/docs/workflows/ci_tests.md b/docs/workflows/ci_tests.md index 3bb94d45..a60cc7d1 100644 --- a/docs/workflows/ci_tests.md +++ b/docs/workflows/ci_tests.md @@ -163,7 +163,7 @@ on: jobs: tests: name: Run basic tests - uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.8.0 with: python_version_pylint_safety: "3.8" python_version_docs: "3.7" @@ -191,7 +191,7 @@ on: jobs: tests: name: Run basic tests - uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_tests.yml@v2.8.0 with: python_version_pylint_safety: "3.8" python_version_docs: "3.7" diff --git a/docs/workflows/ci_update_dependencies.md b/docs/workflows/ci_update_dependencies.md index 9fa892b7..dfaf3b23 100644 --- a/docs/workflows/ci_update_dependencies.md +++ b/docs/workflows/ci_update_dependencies.md @@ -65,7 +65,7 @@ on: jobs: check-dependencies: name: Call external workflow - uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.7.4 + uses: SINTEF/ci-cd/.github/workflows/ci_update_dependencies.yml@v2.8.0 if: github.repository_owner == 'SINTEF' with: git_username: "Casper Welzel Andersen"