From 2f173749d73bfa367d25ec8a3edb7909356485ac Mon Sep 17 00:00:00 2001 From: Xiao Gui Date: Tue, 11 Aug 2020 14:26:27 +0200 Subject: [PATCH] fix gha --- .github/workflows/cd-release.yml | 18 ++++++++++++- .github/workflows/npmpublish.yml | 46 -------------------------------- package.json | 2 +- 3 files changed, 18 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/npmpublish.yml diff --git a/.github/workflows/cd-release.yml b/.github/workflows/cd-release.yml index 4a42504..6230693 100644 --- a/.github/workflows/cd-release.yml +++ b/.github/workflows/cd-release.yml @@ -34,4 +34,20 @@ jobs: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: false - prerelease: false \ No newline at end of file + prerelease: false + + publish-npm: + # needs: build + if: success() + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm i + - run: npm run build + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/npmpublish.yml b/.github/workflows/npmpublish.yml deleted file mode 100644 index 7464312..0000000 --- a/.github/workflows/npmpublish.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Publish Package - -on: - release: - types: [created] - -jobs: - # build: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v1 - # - uses: actions/setup-node@v1 - # with: - # node-version: 12 - # - run: npm ci - # - run: npm test - - publish-npm: - # needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm i - - run: npm run build - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - -# publish-gpr: -# needs: build -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v1 -# - uses: actions/setup-node@v1 -# with: -# node-version: 12 -# registry-url: https://npm.pkg.github.com/ -# scope: '@your-github-username' -# - run: npm ci -# - run: npm publish -# env: -# NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/package.json b/package.json index 75de7dc..b944aea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kg-dataset-previewer", - "version": "1.0.5", + "version": "1.0.6", "description": "Preview a few manually curated datasets.", "main": "dist/index.js", "module": "dist/index.mjs",