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