-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
name: Node.js Package | ||
on: | ||
release: | ||
types: [created] | ||
jobs: | ||
build: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: "12.x" | ||
registry-url: "https://registry.npmjs.org" | ||
fetch-depth: 0 | ||
- name: git config | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
- run: npm install | ||
- run: npm publish | ||
- run: npm run release | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
deploy: | ||
script: | ||
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
- npm run release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"npm": { | ||
"publish": false | ||
}, | ||
"git": { | ||
"changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://github.com/raw/release-it/release-it/master/templates/changelog-compact.hbs", | ||
"tagName": "${version}", | ||
"commitMessage": "Automated release ${version}", | ||
"requireBranch": "develop", | ||
"requireCleanWorkingDir": false, | ||
"git.requireCommits": true | ||
}, | ||
"github": { | ||
"release": true, | ||
"releaseName": "${version}", | ||
"releaseNotes": "npx auto-changelog --stdout --commit-limit false -u --template https://github.com/raw/release-it/release-it/master/templates/changelog-compact.hbs" | ||
}, | ||
|
||
"hooks": { | ||
"after:bump": "npx auto-changelog --commit-limit false -p" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters