From 0cb36ebe6baf18e2cc2da0ae39103da08250633b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:27:34 +0000 Subject: [PATCH 1/3] chore(deps-dev): bump pytest from 7.4.3 to 7.4.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 7.4.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.3...7.4.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5e52b1df..0fe77fbc 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -80,7 +80,7 @@ pylint==3.0.3 pyproject-hooks==1.0.0 ; python_version >= '3.7' -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 From 06173f13d49ab942bf42d9449a4296fe0690eb62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:30:50 +0000 Subject: [PATCH 2/3] chore(deps-dev): bump pytest from 7.4.3 to 7.4.4 Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 7.4.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.3...7.4.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index efb20d79..808206f6 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -80,7 +80,7 @@ pylint==3.0.3 pyproject-hooks==1.0.0 ; python_version >= '3.7' -pytest==7.4.3 +pytest==7.4.4 pytest-cov==4.1.0 From d4a99f0929e8551a7b53e3400fc4b7a961b3a755 Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Tue, 9 Jan 2024 15:44:30 +0300 Subject: [PATCH 3/3] Use one workflow to publish and release --- .github/RELEASE-TEMPLATE.md | 4 ---- .github/workflows/publish.yml | 25 +++++++++++++++++++++---- .github/workflows/release.yml | 32 -------------------------------- 3 files changed, 21 insertions(+), 40 deletions(-) delete mode 100644 .github/RELEASE-TEMPLATE.md delete mode 100644 .github/workflows/release.yml diff --git a/.github/RELEASE-TEMPLATE.md b/.github/RELEASE-TEMPLATE.md deleted file mode 100644 index 7d76e2d1..00000000 --- a/.github/RELEASE-TEMPLATE.md +++ /dev/null @@ -1,4 +0,0 @@ -# Notes -* First Note - -# Changes diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ef535c1..215222ce 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,10 @@ -name: Publish package to PyPI +name: Publish package to PyPI and create release on: - release: - types: - - published + push: + branches: [master, kiota/long-term-branch] + tags: + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: build: @@ -12,6 +13,7 @@ jobs: publish: name: Publish distribution to PyPI runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') environment: pypi_prod needs: [build] steps: @@ -33,4 +35,19 @@ jobs: user: __token__ password: ${{ secrets.PYPI_TOKEN }} + release: + name: Create release + runs-on: ubuntu-latest + needs: [publish] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Extract release notes + id: extract-release-notes + uses: ffurrer2/extract-release-notes@v1 + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release create --notes '${{ steps.extract-release-notes.outputs.release_notes }}' --title ${{ github.ref_name }} ${{ github.ref_name }} + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 11ad58f3..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Create a release - -on: - push: - branches: [kiota/long-term-branch] - tags: - - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 - -jobs: - autorelease: - name: Create release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Python 3.8 - uses: actions/setup-python@v5 - with: - python-version: 3.11 - - name: Release Notes - run: | - git log $(git describe HEAD~ --tags --abbrev=0)..HEAD --pretty='format:* %h %s%n' --no-merges >> ".github/RELEASE-TEMPLATE.md" - - name: Create Release Draft - uses: softprops/action-gh-release@v1 - if: github.repository == 'microsoftgraph/msgraph-sdk-python-core' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - with: - body_path: ".github/RELEASE-TEMPLATE.md" - draft: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file