Skip to content

Commit

Permalink
Strip the leading v from version name
Browse files Browse the repository at this point in the history
  • Loading branch information
tgandrews committed Oct 7, 2020
1 parent f80407e commit 44e9e4a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
excludes: prerelease, draft

- name: Publish to npm
run: npm publish --tag $VERSION
run: npm run publish -- $VERSION
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
VERSION: ${{ steps.latest.outputs.release }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"build": "rm -rf lib && tsc",
"test": "./scripts/test.sh",
"format": "prettier **/*.ts",
"release": "np --no-publish --branch=main"
"release": "np --no-publish --branch=main",
"publish": "./scripts/publish.sh"
},
"repository": "git://github.com/tgandrews/omanyd.git",
"keywords": [
Expand Down
6 changes: 6 additions & 0 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

version=$(echo "$1" | cut -c2-10)

npm publish --tag $version

0 comments on commit 44e9e4a

Please sign in to comment.