Skip to content

Commit

Permalink
fix(ci): simplify version script
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Oct 11, 2020
1 parent 55544f9 commit 418e0b4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,13 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: yarn install
# set up git since we will later push to the repo
- run: git config --global user.name "GitHub CD bot"
- run: git config --global user.email "[email protected]"
# upgrade npm version in package.json to the tag used in the release.
- run: npm version --no-git-tag-version ${{ github.event.release.tag_name }}
# build the project
- run: yarn build
# publish to NPM -> there is one caveat, continue reading for the fix
- run: npm publish
env:
# Use a token to publish to NPM. See below for how to set it up
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# push the version changes to GitHub
- run: git push
env:
# The secret is passed automatically. Nothing to configure.
github-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
"dev": "tsc -w",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "tslint -p tsconfig.json",
"prepare": "npm run build && npm run bundle",
"prepublishOnly": "npm run lint",
"preversion": "npm run lint",
"version": "npm run format && git add -A src",
"postversion": "git push && git push --tags"
"prepare": "npm run build && npm run bundle"
},
"author": "pion",
"license": "MIT",
Expand Down

0 comments on commit 418e0b4

Please sign in to comment.