From c4b0d481e49fb190da61b70340f750a542e04617 Mon Sep 17 00:00:00 2001 From: Toni Ruottu Date: Thu, 17 Aug 2023 17:13:48 +0300 Subject: [PATCH] Setup continuous deployment --- .github/workflows/cd.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..dfef2d3 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,31 @@ +name: CD + +on: + push: + branches: + - main + paths: + - 'package.json' + - '.github/workflows/cd.yml' + +env: + NODE_AUTH_TOKEN: ${{ secrets.PUBLIC_NPM_TOKEN }} + +jobs: + publish: + runs-on: ubuntu-latest + timeout-minutes: 15 + name: publish + steps: + - uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + registry-url: "https://registry.npmjs.org" + - name: Install Dependencies + run: | + yarn + - name: Deploy to Registry + run: | + yarn deploy-npm diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f700bc3..81f3779 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v2 with: - node-version: '14' + node-version: '18' - name: Install Dependencies run: | yarn