From ec29d26fa80c9182cd980cbd15e28855ff789f8a Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Mon, 20 Feb 2023 14:43:03 -0600 Subject: [PATCH] Create build_publish workflow --- .github/workflows/build_publish.yml | 47 +++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build_publish.yml diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml new file mode 100644 index 0000000..0061e70 --- /dev/null +++ b/.github/workflows/build_publish.yml @@ -0,0 +1,47 @@ +name: build_publish + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 18.x + - name: Install dependencies + run: npm install + - name: Build package + run: npm build + - name: Upload build artificat + uses: actions/upload-artifact@v3.1.2 + with: + name: build + path: ./dist + + publish: + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: 18.x + registry-url: https://registry.npmjs.org/ + - name: Install dependencies + run: npm install + - name: Download a build artifact + uses: actions/download-artifact@v3.0.2 + with: + name: build + path: ./dist + - name: Publish to npm registry + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}