-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from Bandwidth/DX-2212
DX-2122 Add NPM Release Logic
- Loading branch information
Showing
4 changed files
with
67 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name-template: 'v$NEXT_MINOR_VERSION' | ||
tag-template: 'v$NEXT_MINOR_VERSION' | ||
change-template: '- $TITLE @$AUTHOR (#$NUMBER)' | ||
exclude-labels: | ||
- 'skip-changelog' | ||
template: | | ||
## Changes | ||
$CHANGES |
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,40 @@ | ||
name: Deploy | ||
on: | ||
release: | ||
types: | ||
- published | ||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
if: ${{ !github.event.release.prerelease && github.event.release.target_commitish == 'main' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set release version | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | ||
- name: Setup Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Build and test npm package | ||
run: | | ||
npm install | ||
npm run build | ||
npm run test --if-present | ||
env: | ||
BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }} | ||
BW_USERNAME: ${{ secrets.BW_USERNAME }} | ||
BW_PASSWORD: ${{ secrets.BW_PASSWORD }} | ||
BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }} | ||
BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }} | ||
BW_NUMBER: ${{ secrets.BW_NUMBER }} | ||
USER_NUMBER: ${{ secrets.USER_NUMBER }} | ||
BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }} | ||
- name: Publish npm package | ||
run: | | ||
npm version $RELEASE_VERSION --no-git-tag-version | ||
npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |
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,19 @@ | ||
name: Create/update draft release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
name: deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Drafts your next Release notes as Pull Requests are merged | ||
- uses: release-drafter/release-drafter@v5 | ||
with: | ||
config-name: draft_release.yml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BW_GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.