From 45ac263ab17875dcec493b2661c8c7d81d2874d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Mate=CC=8Cjka?= Date: Wed, 19 Feb 2020 14:53:20 +0100 Subject: [PATCH] fix: publish to npm --- .github/workflows/build.yml | 19 ------------------- .github/workflows/publish.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9806243..17bbbc2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - 'releases/*' jobs: test: @@ -28,21 +27,3 @@ jobs: KBC_URL: https://connection.keboola.com KBC_TOKEN: ${{ secrets.KBC_TOKEN }} KBC_COMPONENT: keboola.ex-db-mysql - - publish: - if: github.event.ref_type == 'tag' - needs: test - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v1 - - name: Install Node.js - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: Install dependencies - run: yarn install && yarn list --installed - - name: Publish - run: yarn publish --new-version ${GITHUB_REF#"refs/tags/"} --no-git-tag-version - env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..4cbccb8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,21 @@ +name: "Publish" +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: Install Node.js + uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Install dependencies + run: yarn install && yarn list --installed + - name: Publish + run: yarn publish --new-version ${GITHUB_REF#"refs/tags/"} --no-git-tag-version + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}