From ff693dd998a562f24f3e574efc4254bc17b3f589 Mon Sep 17 00:00:00 2001 From: Federico Terzi Date: Wed, 12 Jan 2022 21:40:47 +0100 Subject: [PATCH] feat(misc): add test action to publish homebrew cask --- .github/workflows/release.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 265df10..ec15880 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -231,4 +231,29 @@ jobs: - name: Upload artifacts to Github Releases (if master) if: ${{ github.ref == 'refs/heads/master' }} run: | - gh release upload ${{ needs.extract-version.outputs.espanso_version }} Espanso-Mac-M1.zip Espanso-Mac-M1.zip.sha256.txt \ No newline at end of file + gh release upload ${{ needs.extract-version.outputs.espanso_version }} Espanso-Mac-M1.zip Espanso-Mac-M1.zip.sha256.txt + + macos-publish-homebrew: + # TODO: update to include the two previous macos builds + needs: ["extract-version", "create-release"] + runs-on: macos-11 + + steps: + - uses: actions/checkout@v2 + - name: Print target version + run: | + echo Using version ${{ needs.extract-version.outputs.espanso_version }} + + - name: "Setup SSH deploy key" + uses: webfactory/ssh-agent@fc49353b67b2b7c1e0e6a600572d01a69f2672dd + with: + ssh-private-key: ${{ secrets.HOMEBREW_CASK_SSH_PRIVATE_KEY }} + - name: Create and Publish Homebrew Cask + # TODO: re-add the check + # if: ${{ github.ref == 'refs/heads/master' }} + # TODO: use the right version: + # VERSION="${{ needs.extract-version.outputs.espanso_version }}" ./scripts/publish_homebrew_version.sh + run: | + VERSION="v2.1.2-alpha" ./scripts/publish_homebrew_version.sh + + echo "Cask formula has been published here: " \ No newline at end of file