From 1b0e6c9eff155eb20995a25e26895dc9f961e97f Mon Sep 17 00:00:00 2001 From: tosuke Date: Fri, 18 Jun 2021 16:56:28 +0900 Subject: [PATCH] feat: add publish cd --- .github/workflows/publish-npm.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 000000000..1a21bfd07 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,34 @@ +name: publish-npm + +on: + push: + tags: + - "v*" + +defaults: + run: + working-directory: ./js + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: "14" + - name: Install Packages + run: yarn install --frozen-lockfile --non-interactive --no-progress + - name: Build + run: | + yarn run build:config + yarn run build + - name: Use GitHub npm registry + uses: actions/setup-node@v2 + with: + registry-url: "https://npm.pkg.github.com" + - name: Publish + run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}