-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: native binary distribution via homebrew #432
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
628563a
chore: codesign for Mac
PatrickDinh 3c0950d
chore: fix tap GitHub repository
PatrickDinh 572ea5b
chore: add metadata to the brew tar file
negar-abbasi 38bdd37
chore: add metadat file before sign
negar-abbasi 316cf8d
chore: testing ci
aorumbayev 396942b
chore: testing ci
aorumbayev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "Install Apple Developer ID certificate" | ||
description: "Install Apple Developer ID certificate to macos-build keychain" | ||
inputs: | ||
cert_data: | ||
description: "Base64 string represents the Apple developer ID certificate" | ||
required: true | ||
cert_password: | ||
description: "The password to unlock the Apple developer ID certificate" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install cert | ||
shell: bash | ||
env: | ||
APPLE_CERT_DATA: ${{ inputs.cert_data }} | ||
APPLE_CERT_PASSWORD: ${{ inputs.cert_password }} | ||
run: | | ||
# Export certs | ||
echo "$APPLE_CERT_DATA" | base64 --decode > /tmp/certs.p12 | ||
|
||
# Create keychain | ||
security create-keychain -p actions macos-build.keychain | ||
security default-keychain -s macos-build.keychain | ||
security unlock-keychain -p actions macos-build.keychain | ||
security set-keychain-settings -t 3600 -u macos-build.keychain | ||
echo "Keychain created" | ||
|
||
# Import certs to keychain | ||
security import /tmp/certs.p12 -k ~/Library/Keychains/macos-build.keychain -P "$APPLE_CERT_PASSWORD" -T /usr/bin/codesign -T /usr/bin/productsign | ||
echo "Cert imported" | ||
|
||
# Key signing | ||
security set-key-partition-list -S apple-tool:,apple: -s -k actions macos-build.keychain | ||
echo "Key signed" | ||
|
||
# Delete temp file | ||
rm /tmp/certs.p12 | ||
echo "Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Publish packages to public repositories | |
on: | ||
workflow_call: | ||
inputs: | ||
artifactName: | ||
wheelArtifactName: | ||
required: true | ||
type: string | ||
description: "The github artifact holding the wheel file which will be published" | ||
|
@@ -67,24 +67,40 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
# Download either via release or provided artifact | ||
- name: Download release | ||
- name: Download wheel from release | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: gh release download v${{ inputs.release_version }} --pattern "*.whl" --dir dist | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Download artifact | ||
- name: Download wheel from artifact | ||
if: ${{ github.event_name == 'workflow_call' }} | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.artifactName }} | ||
name: ${{ inputs.wheelArtifactName }} | ||
path: dist | ||
|
||
- name: Download macOS binary from release | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: gh release download ${{ inputs.release }} --pattern "*-brew.tar.gz" --dir dist | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
- name: Download macOS binary from artifact | ||
uses: actions/download-artifact@v4 | ||
if: ${{ github.event_name == 'workflow_call' }} | ||
with: | ||
name: ${{ inputs.binaryArtifactName }} | ||
path: dist | ||
|
||
- name: Set Git user as GitHub actions | ||
run: git config --global user.email "[email protected]" && git config --global user.name "github-actions" | ||
|
||
- name: ls dist folder | ||
run: ls -la dist | ||
|
||
- name: Update homebrew cask | ||
run: scripts/update-brew-cask.sh "dist/algokit*-py3-none-any.whl" "algorandfoundation/homebrew-tap" | ||
run: scripts/update-brew-cask.sh "dist/algokit*-py3-none-any.whl" "dist/algokit*-macos_arm64-brew.tar.gz" "dist/algokit*-macos_x64-brew.tar.gz" "algorandfoundation/homebrew-tap" | ||
env: | ||
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to extract the artifact file name? The input is
dist/algokit*-py3-none-any.whl