Skip to content

build(deps): Bump importlib-metadata from 7.1.0 to 7.2.0 #2328

build(deps): Bump importlib-metadata from 7.1.0 to 7.2.0

build(deps): Bump importlib-metadata from 7.1.0 to 7.2.0 #2328

Workflow file for this run

---
name: Release
on: # yamllint disable-line rule:truthy
push:
branches:
- main # forward-compatibility with new GitHub default branch naming
- master # backward-compatibility with old GitHub default branch naming
workflow_dispatch:
pull_request:
jobs:
# Shared tag & version number info ----------------------
get-tag-xor-dev-version:
name: Get tags and version numbers
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.detect-new-version-tag.outputs.tag }}
dev-version: ${{ steps.bump-dev-version.outputs.version }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v5.0.0
with:
python-version: "3.10"
- name: Upgrade pip
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pip install --constraint=.github/workflows/constraints.txt poetry
poetry --version
- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
- name: Detect new version tag
id: detect-new-version-tag
if: "steps.check-parent-commit.outputs.sha"
run: |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
git checkout HEAD~
PARENT_COMMIT_VER=$(make get-project-version-number)
git checkout "${BRANCH_NAME}"
CURRENT_COMMIT_VER=$(make get-project-version-number)
if [[ "${PARENT_COMMIT_VER}" != "${CURRENT_COMMIT_VER}" ]]; then
echo "::set-output name=tag::${CURRENT_COMMIT_VER}"
fi
- name: Bump version for developmental release
id: bump-dev-version
if: "! steps.detect-new-version-tag.outputs.tag"
run: |
poetry version patch &&
VERSION=$(make get-project-version-number) &&
DEV_VERSION="${VERSION}.dev.$(date +%s)" &&
poetry version "${DEV_VERSION}" &&
echo "::set-output name=version::${DEV_VERSION}"
# Release notes publication ----------------------
publish-release-notes:
name: Publish release notes
runs-on: ubuntu-latest
needs:
- get-tag-xor-dev-version
permissions:
pull-requests: write
contents: write
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Publish the release notes
uses: release-drafter/release-drafter@v6.0.0
with:
publish: ${{ needs.get-tag-xor-dev-version.outputs.tag != '' }}
# Annotated tag to associate with the current commit
tag: ${{ needs.get-tag-xor-dev-version.outputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}