From 53ce15ec853b7533b6efba8ae2645246e6f4a6f1 Mon Sep 17 00:00:00 2001 From: Riccardo Canella Date: Tue, 19 Jan 2021 09:19:14 +0100 Subject: [PATCH] build(actions): publish on npm with correct tag --- .github/workflows/github-release.yml | 3 +-- .github/workflows/npm-release.yml | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/npm-release.yml diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 062be30..bf65c07 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -2,9 +2,8 @@ name: Create Github Release on: push: - # Sequence of patterns matched against refs/tags tags: - - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 + - "v*" jobs: build: diff --git a/.github/workflows/npm-release.yml b/.github/workflows/npm-release.yml new file mode 100644 index 0000000..6fee0a5 --- /dev/null +++ b/.github/workflows/npm-release.yml @@ -0,0 +1,25 @@ +name: Create Npm Release + +on: + push: + tags: + - "v*" + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v1 + - name: Install dependencies with node + uses: actions/setup-node@v1 + with: + node-version: 13.7 + - run: yarn install + - run: yarn test + - run: yarn build + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + tag: ${{ github.ref }} + access: public