Przeglądaj źródła

feat: add package splitter

George Cushen 3 lat temu
rodzic
commit
eb26160ea9
1 zmienionych plików z 39 dodań i 0 usunięć
  1. 39 0
      .github/workflows/split-packages.yaml

+ 39 - 0
.github/workflows/split-packages.yaml

@@ -0,0 +1,39 @@
+name: 'Package Splitter'
+
+on:
+  push:
+    branches:
+      - main
+
+env:
+  GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
+
+jobs:
+  packages_split:
+    runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        # define package to repository map
+        package:
+          - local_path: 'markdown-slides'
+            split_repository: 'starter-hugo-markdown-slides'
+
+    steps:
+      -   uses: actions/checkout@v2
+
+      # step if no tag is pushed
+      - if: "!startsWith(github.ref, 'refs/tags/')"
+        uses: "symplify/monorepo-split-github-action@2.1"
+        with:
+          # ↓ split "packages/<package-name><package-name>" directory
+          package_directory: 'starters/${{ matrix.package.local_path }}'
+
+          # ↓ into https://github.com/wowchemy/<package-name> repository
+          repository_organization: 'wowchemy'
+          repository_name: '${{ matrix.package.split_repository }}'
+
+          # ↓ the user signed under the split commit
+          user_name: "Splitter Bot"
+          user_email: "no.reply@wowchemy.com"