From 9e839dd46d23b3e94a878f8c127538de0db71353 Mon Sep 17 00:00:00 2001 From: Charlie Greenman Date: Tue, 15 Aug 2023 15:42:16 -0700 Subject: [PATCH] Push through workflow files. --- .github/workflows | 0 .github/workflows/pr-devops.yml | 17 +++++++++++++++++ .github/workflows/publish.yml | 22 ++++++++++++++++++++++ 3 files changed, 39 insertions(+) delete mode 100644 .github/workflows create mode 100644 .github/workflows/pr-devops.yml create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows b/.github/workflows deleted file mode 100644 index e69de29..0000000 diff --git a/.github/workflows/pr-devops.yml b/.github/workflows/pr-devops.yml new file mode 100644 index 0000000..27797e5 --- /dev/null +++ b/.github/workflows/pr-devops.yml @@ -0,0 +1,17 @@ +name: Run Unit Tests + +on: + pull_request: + branches: [ main ] + workflow_dispatch: +jobs: + DevOpsPRUnitTests: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build Private Dependencies And Test + run: | + npm install + npm run build + npm test -- -u \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9489141 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,22 @@ + +name: Publish to NPM +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 + run: npm ci && npm run build + - name: Publish package on NPM 📦 + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file