Skip to content

Commit 2eba027

Browse files
committed
feat: publish submodules package for homebrew
1 parent 072ec65 commit 2eba027

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,24 @@ jobs:
8888
esac;
8989
popd >/dev/null
9090
91+
# Packaging submodules for homebrew distribution
92+
- name: Package submodules
93+
id: submodules
94+
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.job.target == 'macos' }}
95+
run: |
96+
PKG_SUBMOD_NAME="${{ env.PROJECT }}-${{ steps.vars.outputs.PKG_VERSION }}-submodules.zip"
97+
PKG_SUBMOD_PATH="${{ steps.vars.outputs.PKG_STAGING }}/$PKG_SUBMOD_NAME"
98+
99+
zip -r $PKG_SUBMOD_PATH ./ -x "*.git*" -x "*.vscode*" -x "${{ env.BIN }}*" -x "${{ steps.vars.outputs.PKG_STAGING }}*"
100+
101+
echo ::set-output name=PKG_SUBMOD_NAME::${PKG_SUBMOD_NAME}
102+
echo ::set-output name=PKG_SUBMOD_PATH::${PKG_SUBMOD_PATH}
103+
91104
- name: Publish release assets
92105
uses: softprops/action-gh-release@v1
93106
if: startsWith(github.ref, 'refs/tags/')
94107
with:
95108
generate_release_notes: true
96-
files: ${{ steps.vars.outputs.PKG_PATH }}
109+
files: |
110+
${{ steps.vars.outputs.PKG_PATH }}
111+
${{ steps.submodules.outputs.PKG_SUBMOD_PATH }}

0 commit comments

Comments
 (0)