Merge pull request #161 from lizhanhui/feat_distribution

feat: include sample plugins when building distribution package and generate .zip/.tar.gz formats by default
diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml
new file mode 100644
index 0000000..f022de8
--- /dev/null
+++ b/.github/workflows/tagged-release.yml
@@ -0,0 +1,31 @@
+---
+name: "tagged-release"
+
+on:
+  push:
+    tags:
+      - "v*"
+
+jobs:
+  tagged-release:
+    name: "Tagged Release"
+    runs-on: "ubuntu-latest"
+
+    steps:
+      - uses: actions/checkout@v3
+      - name: Set up JDK 8
+        uses: actions/setup-java@v3
+        with:
+          java-version: '8'
+          distribution: 'temurin'
+          server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
+          settings-path: ${{ github.workspace }} # location for the settings.xml file
+      - name: Build with Maven
+        run: mvn package -Dmaven.test.skip=true
+      - uses: "marvinpinto/action-automatic-releases@latest"
+        with:
+          repo_token: "${{ secrets.GITHUB_TOKEN }}"
+          prerelease: false
+          files: |
+            dist/target/*.tar.gz
+            dist/target/*.zip
\ No newline at end of file
diff --git a/dist/src/main/assembly/assembly.xml b/dist/src/main/assembly/assembly.xml
index 26b0cc6..a56bf42 100644
--- a/dist/src/main/assembly/assembly.xml
+++ b/dist/src/main/assembly/assembly.xml
@@ -4,6 +4,8 @@
     <id>assembly</id>
     <formats>
         <format>dir</format>
+        <format>zip</format>
+        <format>tar.gz</format>
     </formats>
 
     <includeBaseDirectory>true</includeBaseDirectory>
@@ -18,6 +20,23 @@
         </dependencySet>
     </dependencySets>
 
+    <moduleSets>
+        <moduleSet>
+            <useAllReactorProjects>true</useAllReactorProjects>
+            <includes>
+                <include>org.apache.rocketmq:connect-filter-transform</include>
+                <include>org.apache.rocketmq:connect-eventbridge-transform</include>
+                <include>org.apache.rocketmq:eventbridge-connect-file</include>
+            </includes>
+            <binaries>
+                <attachmentClassifier>jar-with-dependencies</attachmentClassifier>
+                <outputDirectory>plugin/</outputDirectory>
+                <unpack>false</unpack>
+                <includeDependencies>false</includeDependencies>
+            </binaries>
+        </moduleSet>
+    </moduleSets>
+
     <fileSets>
         <fileSet>
             <directory>src/main/bin</directory>