Skip to content

Commit

Permalink
CI: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkudera committed Jun 25, 2020
1 parent d6b30dd commit 645a473
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 27 deletions.
32 changes: 5 additions & 27 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,18 @@ on:
tags: ['*']

jobs:
build:
npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: sed -i "s/0.0.0-version-placeholder/${{github.event.release.tag_name}}/" package.json
registry-url: https://registry.npmjs.org/
- run: echo ::set-env name=GIT_TAG::${GITHUB_REF#refs/*/}
- run: sed -i "s/0.0.0-version-placeholder/${{env.GIT_TAG}}/" package.json
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v1
with:
name: package
path: package.json
- uses: actions/upload-artifact@v1
with:
name: build
path: lib

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v1
with:
name: package
- uses: actions/download-artifact@v1
with:
name: build
- run: npm publish
- run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
/src
/.github
tsconfig.json

0 comments on commit 645a473

Please sign in to comment.