Add automatic deploy to Homebrew on CI
This commit is contained in:
parent
ae0f68d0ea
commit
afbb5553b8
|
@ -26,6 +26,7 @@ jobs:
|
||||||
- template: ci/test.yml
|
- template: ci/test.yml
|
||||||
- template: ci/build-macos.yml
|
- template: ci/build-macos.yml
|
||||||
- template: ci/deploy.yml
|
- template: ci/deploy.yml
|
||||||
|
- template: ci/publish-homebrew.yml
|
||||||
|
|
||||||
- job: Windows
|
- job: Windows
|
||||||
pool:
|
pool:
|
||||||
|
|
|
@ -13,5 +13,6 @@ steps:
|
||||||
set -e
|
set -e
|
||||||
python packager.py build
|
python packager.py build
|
||||||
cp target/packager/mac/espanso-*.gz .
|
cp target/packager/mac/espanso-*.gz .
|
||||||
|
cp target/packager/mac/espanso.rb .
|
||||||
ls -la
|
ls -la
|
||||||
displayName: "Cargo build and packaging for MacOS"
|
displayName: "Cargo build and packaging for MacOS"
|
23
ci/publish-homebrew.yml
Normal file
23
ci/publish-homebrew.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
parameters:
|
||||||
|
github:
|
||||||
|
gitHubConnection: "MyGithubConnection"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- task: InstallSSHKey@0
|
||||||
|
inputs:
|
||||||
|
knownHostsEntry: "|1|O7/oHnAkobor3z8tAi95ahYk64o=|QNEcrbUqutXSvEaPDYdiOgR4yV0= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="
|
||||||
|
sshPublicKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsB9zcHN84/T5URAsfIpb52HnJl2kUK7WWXyV9pFXaO6yz722JxzVq56J3TTrcUCDhM3DKSGKivB6n/tmLw4mefcY3t7kh8puAtaNrNnB4TWqVPFHZtnpYuYslp1rM92r7Bz1FHfVfsDZxqSWlGU/lp0gNEEgXbr2PCExbCh3TGTsKePARhMAtPEvyEZk1+8uA/HvUTjhuDp7P+BbejAsqtgVF0QoEvqDE5af8DZY6+i1cHRgwBYgSnOus8FHsZUGMyAJQtb+dD7imGw/nzokPJzbmQJwQetyhp52CfThpAm12EFtIU43imb8nndlVAmsIHF6czbmI5LP3U0UcTLct freddy@freddy-Z97M-DS3H"
|
||||||
|
sshKeySecureFile: "azuressh"
|
||||||
|
- script: |
|
||||||
|
set -ex
|
||||||
|
git config --global user.email "federicoterzi96@gmail.com"
|
||||||
|
git config --global user.email "Federico Terzi"
|
||||||
|
VER=$(cat Cargo.toml| grep version -m 1 | awk -F '"' '{ print $2 }')
|
||||||
|
git clone git@github.com:federico-terzi/homebrew-espanso.git
|
||||||
|
rm homebrew-espanso/Formula/espanso.rb
|
||||||
|
cp espanso.rb homebrew-espanso/Formula/espanso.rb
|
||||||
|
cd homebrew-espanso
|
||||||
|
git add -A
|
||||||
|
git commit -m "Update to version: $VER"
|
||||||
|
git push
|
||||||
|
displayName: "Publishing to Homebrew"
|
|
@ -4,7 +4,7 @@
|
||||||
class Espanso < Formula
|
class Espanso < Formula
|
||||||
desc "{{{app_desc}}}"
|
desc "{{{app_desc}}}"
|
||||||
homepage "{{{app_url}}}"
|
homepage "{{{app_url}}}"
|
||||||
url "{{{app_release_url}}}"
|
url "https://github.com/federico-terzi/espanso/releases/latest/download/espanso-mac.tar.gz"
|
||||||
sha256 "{{{release_hash}}}"
|
sha256 "{{{release_hash}}}"
|
||||||
version "{{{app_version}}}"
|
version "{{{app_version}}}"
|
||||||
|
|
||||||
|
|
|
@ -468,9 +468,4 @@ mod tests {
|
||||||
assert_eq!(config_manager.calculate_active_config().name, "firefox");
|
assert_eq!(config_manager.calculate_active_config().name, "firefox");
|
||||||
assert_eq!(config_manager.active_config().name, "default");
|
assert_eq!(config_manager.active_config().name, "default");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_should_fail() {
|
|
||||||
assert!(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user