Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

Commit

Permalink
fix: automatically increment version from tag (#189)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaspearson committed Jan 7, 2021
1 parent 784f7c9 commit 32469c0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -15,24 +18,32 @@ 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"
registry-url: "https://npm.pkg.github.com"
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 }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 32469c0

Please sign in to comment.