From de0f7d90fb33c9d979a8a7472bdf874dd5bbe608 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Mon, 30 Sep 2024 17:18:48 -0400 Subject: [PATCH] GHA setup --- .github/workflows/main.yaml | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..8f9c276 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,66 @@ +name: Main + +on: + workflow_dispatch: + push: + branches: + - 'main' + +jobs: + build: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + + steps: + - name: Setup job workspace + uses: ServerlessOpsIO/gha-setup-workspace@v1 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Install Yarn via corepack + shell: bash + run: corepack enable + + - name: Install dependencies + shell: bash + run: yarn install --immutable + + - name: Build + shell: bash + run: yarn run build + + - name: Test + shell: bash + run: yarn run test + + - name: Generate docset + shell: bash + run: yarn run docset + + - name: Store Artifacts + uses: ServerlessOpsIO/gha-store-artifacts@v1 + + + deploy: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + + steps: + - name: Setup job workspace + uses: ServerlessOpsIO/gha-setup-workspace@v1 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: Package + shell: bash + run: yarn run package