From 0d09867450517ff52bab34b808c03dccce78630c Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Tue, 26 Mar 2024 11:23:12 +0100 Subject: [PATCH 1/2] Avocado bot token in release workflow It adds Avocado bot organization token to the release workflow instead of personal token. This makes the release independent to one specific avocado maintainer. Signed-off-by: Jan Richter --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dba5add58d..05d4f934cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,13 @@ jobs: URL: "https://readthedocs.org/api/v3/projects/${{ github.event.inputs.rtd_project }}" steps: + - name: Generate token + id: generate_token + uses: tibdex/github-app-token@021a2405c7f990db57f5eae5397423dcc554159c + with: + app_id: ${{ secrets.MR_AVOCADO_ID }} + installation_id: ${{ secrets.MR_AVOCADO_INSTALLATION_ID }} + private_key: ${{ secrets.MR_AVOCADO_PRIVATE_KEY }} - name: install required packages run: dnf -y install rpmdevtools git python3-pip make - uses: actions/checkout@v3 @@ -59,7 +66,7 @@ jobs: - name: Push changes to github uses: ad-m/github-push-action@master with: - github_token: ${{ secrets.RELEASE_TOKEN }} + github_token: ${{ steps.generate_token.outputs.token }} branch: ${{ github.ref }} - name: Build wheel run: make -f Makefile.gh build-wheel check-wheel @@ -104,7 +111,7 @@ jobs: - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: - repo_token: ${{ secrets.RELEASE_TOKEN }} + repo_token: ${{ steps.generate_token.outputs.token }} file: ${{ github.workspace }}/EGG_UPLOAD/avocado_framework*egg tag: ${{ github.event.inputs.version }} overwrite: true From 51b3bab9a7a1b774eb016590217acdab3a7a8cc1 Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Tue, 26 Mar 2024 14:30:52 +0100 Subject: [PATCH 2/2] Build eggs for python 3.12 in release workflow fix From the python 3.12 the setuptools are not part of python and needs to be installed separately. Let's update the release workflow to handle this issue until #5754 will be fixed. Signed-off-by: Jan Richter --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05d4f934cd..3642b9cce7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,7 +107,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Build eggs - run: make -f Makefile.gh build-egg + run: | + if python -c 'import sys; exit(0) if sys.version_info.minor > 11 else exit(1)' ; then + pip install setuptools + fi + make -f Makefile.gh build-egg - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: