diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0658c76..c8c68c1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -7,6 +7,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.2 + - name: Set release version + id: vars + run: echo ::set-output name=tag::${{ github.event.release.tag_name }} | cut -d "v" -f 2 - uses: actions/setup-node@v2 with: always-auth: true @@ -15,15 +18,20 @@ jobs: scope: "@minddoc" - name: Publish the package run: | + npm version ${RELEASE_VERSION} npm config set registry https://registry.npmjs.org echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + RELEASE_VERSION: ${{ steps.vars.outputs.tag }} publish-github: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.2 + - name: Set release version + id: vars + run: echo ::set-output name=tag::${{ github.event.release.tag_name }} | cut -d "v" -f 2 - uses: actions/setup-node@v2 with: node-version: "13.x" @@ -31,8 +39,11 @@ jobs: scope: "@minddocdev" - name: Publish the package run: | + npm version ${RELEASE_VERSION} + npm config set name @minddocdev/nest-express-winston npm config set registry https://npm.pkg.github.com echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.MINDDOCBOT_TOKEN }} + RELEASE_VERSION: ${{ steps.vars.outputs.tag }} diff --git a/package.json b/package.json index ec8ee47..e59fecc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@minddoc/nest-express-winston", - "version": "0.2.77", + "version": "0.0.0", "description": "Implementation of a nestjs logger using winston and express-winston", "author": "MindDoc Health GmbH", "license": "MIT",