mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
workflows/pkg-installer: fix release upload.
- Get the release tag from the installer path. - Remove unnecessary `gh` installation. - Remove failing test that I can't fix.
This commit is contained in:
parent
171fba9c84
commit
2131d70265
10
.github/workflows/pkg-installer.yml
vendored
10
.github/workflows/pkg-installer.yml
vendored
@ -230,17 +230,15 @@ jobs:
|
|||||||
--password "${PKG_APPLE_ID_APP_SPECIFIC_PASSWORD}"
|
--password "${PKG_APPLE_ID_APP_SPECIFIC_PASSWORD}"
|
||||||
--wait
|
--wait
|
||||||
|
|
||||||
- name: Install gh
|
|
||||||
run: brew install gh
|
|
||||||
|
|
||||||
- name: Upload installer to GitHub release
|
- name: Upload installer to GitHub release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
INSTALLER_PATH: ${{ needs.build.outputs.installer_path }}
|
INSTALLER_PATH: ${{ needs.build.outputs.installer_path }}
|
||||||
run: gh release upload --repo Homebrew/brew
|
run: |
|
||||||
"${GITHUB_REF//refs\/tags\//}"
|
VERSION="${INSTALLER_PATH#Homebrew-}"
|
||||||
"${INSTALLER_PATH}"
|
VERSION="${VERSION%.pkg}"
|
||||||
|
gh release upload --repo Homebrew/brew "${VERSION}" "${INSTALLER_PATH}"
|
||||||
|
|
||||||
issue:
|
issue:
|
||||||
needs: [build, test, upload]
|
needs: [build, test, upload]
|
||||||
|
@ -71,14 +71,6 @@ RSpec.describe GitHub do
|
|||||||
)
|
)
|
||||||
expect(urls).to eq(["https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/1969725476/zip"])
|
expect(urls).to eq(["https://api.github.com/repos/Homebrew/homebrew-core/actions/artifacts/1969725476/zip"])
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
describe "::pull_request_commits", :needs_network do
|
describe "::pull_request_commits", :needs_network do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user