From f6f858af2d2bdea0b28c8db253737967a6c72201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 4 Oct 2023 16:44:52 +0200 Subject: [PATCH 1/2] Update bump-homebrew-formula configuration Moving the conversation from https://github.com/Homebrew/homebrew-core/pull/149334#issuecomment-1746766176 This updates the `download-url` input to the `bump-homebrew-formula-action` to be a URL in the format of `https://pypi.org/packages/source/a/ansible-lint/ansible-lint-.tar.gz`. That resource ultimately resolves to `https://files.pythonhosted.org/packages/*/*/*/ansible-lint-.tar.gz`, which is the URL format currently present in the homebrew-core formula. I find the latter form unwieldy, and I think that the `pypi.org`-hosted resource looks much nicer and should be the same trustworthiness. --- .github/workflows/release.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 444630e4d4..2d15028ed6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,6 +60,7 @@ jobs: environment: release runs-on: ubuntu-22.04 needs: pypi + if: github.event_name == 'release' env: FORCE_COLOR: 1 @@ -67,16 +68,18 @@ jobs: TOXENV: pkg steps: - - name: Check out src from Git - uses: actions/checkout@v4 - with: - fetch-depth: 0 # needed by setuptools-scm - submodules: true + - name: Extract version + id: extract-version + env: + TAG_NAME: ${{ github.event.release.tag_name }} + run: | + echo "version=${TAG_NAME#v}" >> $GITHUB_OUTPUT - name: Bump homebrew formula uses: mislav/bump-homebrew-formula-action@v3.1 with: # A PR will be sent to github.com/Homebrew/homebrew-core to update this formula: formula-name: ansible-lint + download-url: https://pypi.org/packages/source/a/ansible-lint/ansible-lint-${{ steps.extract-version.outputs.version }}.tar.gz env: COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }} From d23509c47fd69abdf36003cf5cd14f530e7adfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 4 Oct 2023 17:21:36 +0200 Subject: [PATCH 2/2] Remove bump-homebrew-formula job The bump-homebrew-formula action is non-viable for this project because it is not able to update the individual `resource` blocks of the Homebrew formula for each python dependency. --- .github/workflows/release.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2d15028ed6..1f9b2f8a5f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,4 @@ --- -# cspell:ignore mislav name: release "on": @@ -54,32 +53,3 @@ jobs: if: >- # "create" workflows run separately from "push" & "pull_request" github.event_name == 'release' uses: pypa/gh-action-pypi-publish@release/v1 - - homebrew: - name: Bump homebrew formula - environment: release - runs-on: ubuntu-22.04 - needs: pypi - if: github.event_name == 'release' - - env: - FORCE_COLOR: 1 - PY_COLORS: 1 - TOXENV: pkg - - steps: - - name: Extract version - id: extract-version - env: - TAG_NAME: ${{ github.event.release.tag_name }} - run: | - echo "version=${TAG_NAME#v}" >> $GITHUB_OUTPUT - - - name: Bump homebrew formula - uses: mislav/bump-homebrew-formula-action@v3.1 - with: - # A PR will be sent to github.com/Homebrew/homebrew-core to update this formula: - formula-name: ansible-lint - download-url: https://pypi.org/packages/source/a/ansible-lint/ansible-lint-${{ steps.extract-version.outputs.version }}.tar.gz - env: - COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}