From ac84020fc17e245ce673d7c3618e5343539c0f03 Mon Sep 17 00:00:00 2001 From: Prakhar Gurunani Date: Sat, 2 Mar 2024 22:53:41 +0530 Subject: [PATCH 1/3] wip: fix commits --- .github/workflows/test.yml | 9 +++++++++ build.sh | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d2491b..64b35a2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,6 +52,15 @@ jobs: brew cleanup --prune-prefix sudo rm -rf $(brew --repo homebrew/core) + # Save distributable as Artifact + - name: Save Distributable + uses: actions/upload-artifact@v2 + with: + name: metacall + path: pkg/*.pkg + retention-days: 1 + if-no-files-found: error + # Build Homebrew recipe - name: Build run: ./build.sh diff --git a/build.sh b/build.sh index 795fea6..63d54cb 100755 --- a/build.sh +++ b/build.sh @@ -10,3 +10,9 @@ fi # Build metacall brew recipe export HOMEBREW_NO_AUTO_UPDATE=1 brew install ./metacall.rb --build-from-source --overwrite -v + +# Build distributable binary using brew pkg +mkdir pkg && cd pkg +brew tap timsutton/formulae +brew install brew-pkg +brew pkg --with-deps --without-kegs metacall From a1e2a89e8c3258b856728192ff90295e08ddbaff Mon Sep 17 00:00:00 2001 From: Prakhar Gurunani Date: Sun, 3 Mar 2024 16:10:28 +0530 Subject: [PATCH 2/3] fix: workflow order --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64b35a2..3cdc1c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,6 +52,10 @@ jobs: brew cleanup --prune-prefix sudo rm -rf $(brew --repo homebrew/core) + # Build Homebrew recipe + - name: Build + run: ./build.sh + # Save distributable as Artifact - name: Save Distributable uses: actions/upload-artifact@v2 @@ -60,10 +64,6 @@ jobs: path: pkg/*.pkg retention-days: 1 if-no-files-found: error - - # Build Homebrew recipe - - name: Build - run: ./build.sh # Test Homebrew recipe - name: Test From 7c898161c3c06f937bad010d845c209a3c163adb Mon Sep 17 00:00:00 2001 From: Vicente Eduardo Ferrer Garcia <7854099+viferga@users.noreply.github.com> Date: Mon, 4 Mar 2024 11:13:14 -0500 Subject: [PATCH 3/3] Release do --- .github/workflows/test.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cdc1c3..fb2ea91 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,10 @@ name: Build and Test Homebrew MetaCall on: push: + branches: + - main + tags: + - "v*.*.*" pull_request: workflow_dispatch: @@ -56,15 +60,14 @@ jobs: - name: Build run: ./build.sh - # Save distributable as Artifact - - name: Save Distributable - uses: actions/upload-artifact@v2 - with: - name: metacall - path: pkg/*.pkg - retention-days: 1 - if-no-files-found: error - # Test Homebrew recipe - name: Test run: ./test.sh + + # Release package + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + fail_on_unmatched_files: true + files: pkg/*.pkg