Skip to content

Commit

Permalink
fix: publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubMatejka committed Feb 19, 2020
1 parent 972662d commit 45ac263
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- master
- 'releases/*'

jobs:
test:
Expand All @@ -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 }}
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 45ac263

Please sign in to comment.