Merge pull request #20017 from Homebrew/release_fixes

workflows/pkg-installer: fix release upload.
This commit is contained in:
Mike McQuaid 2025-05-27 11:15:51 +00:00 committed by GitHub
commit 600cb4544d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 14 deletions

View File

@ -230,17 +230,15 @@ jobs:
--password "${PKG_APPLE_ID_APP_SPECIFIC_PASSWORD}"
--wait
- name: Install gh
run: brew install gh
- name: Upload installer to GitHub release
if: github.event_name == 'release'
env:
GH_TOKEN: ${{ github.token }}
INSTALLER_PATH: ${{ needs.build.outputs.installer_path }}
run: gh release upload --repo Homebrew/brew
"${GITHUB_REF//refs\/tags\//}"
"${INSTALLER_PATH}"
run: |
VERSION="${INSTALLER_PATH#Homebrew-}"
VERSION="${VERSION%.pkg}"
gh release upload --repo Homebrew/brew "${VERSION}" "${INSTALLER_PATH}"
issue:
needs: [build, test, upload]

View File

@ -71,14 +71,6 @@ RSpec.describe GitHub do
)
expect(urls).to eq(["https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/1969725476/zip"])
end
it "supports pattern matching" do
urls = described_class.get_artifact_urls(
described_class.get_workflow_run("Homebrew", "brew", "17068",
workflow_id: "pkg-installer.yml", artifact_pattern: "Homebrew-*.pkg"),
)
expect(urls).to eq(["https://api.github.com/repos/Homebrew/brew/actions/artifacts/1405050842/zip"])
end
end
describe "::pull_request_commits", :needs_network do