Add CI and Soft-Serve workflows

Ayman Bagabas created

Change summary

.github/workflows/ci.yml         | 34 ++++++++++++++++++++++++++++++++++
.github/workflows/soft-serve.yml | 22 ++++++++++++++++++++++
2 files changed, 56 insertions(+)

Detailed changes

.github/workflows/ci.yml 🔗

@@ -0,0 +1,34 @@
+name: CI
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+
+jobs:
+
+  build:
+    strategy:
+      matrix:
+        go-version: [~1.17]
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+
+    # Remove this later
+    - name: Clone internal repositories
+      run: |
+        git clone -b release https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/charm-internal ../charm
+        git clone -b master https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/bubbletea-internal ../bubbletea
+        git clone -b master https://${{ secrets.ACCESS_TOKEN }}@github.com/charmbracelet/wish ../wish
+
+    - name: Set up Go
+      uses: actions/setup-go@v2
+      with:
+        go-version: ${{ matrix.go-version }}
+
+    - name: Build
+      run: go build -v .
+
+    - name: Test
+      run: go test -v .

.github/workflows/soft-serve.yml 🔗

@@ -0,0 +1,22 @@
+name: Soft-Serve
+
+on:
+  push:
+    branches:
+      - main
+
+jobs:
+  softserve:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+
+      - name: Push to Soft-Serve
+        uses: charmbracelet/soft-serve-action@v1
+        with:
+          server: "beta.charm.sh"
+          ssh-key: "${{ secrets.CHARM_SOFT_SERVE_KEY }}"
+          name: "soft-serve"