Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Continuous deployment

on:
push:
branches:
- main
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- id: set-version
name: Run npx version-from-git --no-git-tag-version
run: |
npx version-from-git --no-git-tag-version
echo version=`cat package.json | jq -r '.version'` > $GITHUB_OUTPUT
- run: npm clean-install
- run: npm run prepublishOnly
- name: Upload tarball artifact
uses: actions/upload-artifact@v3.1.1
with:
name: bundle
path: ./dist
- run: npm pack
- name: Upload tarball artifact
uses: actions/upload-artifact@v3.1.1
with:
name: tarball
path: ./*.tgz

publish:
needs: build
runs-on: ubuntu-latest
environment: prerelease

steps:
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Download tarball artifact
uses: actions/download-artifact@v3.0.1
with:
name: tarball
- id: get-version
name: Get version
run: |
echo package-name=`tar --extract --file=\`ls ./*.tgz\` --to-stdout package/package.json | jq -r .name` >> $GITHUB_OUTPUT
echo version=`tar --extract --file=\`ls ./*.tgz\` --to-stdout package/package.json | jq -r .version` >> $GITHUB_OUTPUT
- if: ${{ !contains(steps.get-version.outputs.version, '-') }}
name: Validate version
run: |
echo Cannot publish production version
exit 1
- run: npm publish --access public --tag ${{ github.ref_name }} `ls *.tgz`
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate job summary
run: echo "NPM package has been published to https://npmjs.com/package/${{ steps.get-version.outputs.package-name }}/v/${{ steps.get-version.outputs.version }}." > $GITHUB_STEP_SUMMARY
81 changes: 81 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Publish release on push tag

on:
push:
tags: 'v*'

jobs:
build-and-draft:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- id: get-version
name: Get version
run: echo version=`cat package.json | jq -r '.version'` >> $GITHUB_OUTPUT
- name: Validate version
if: ${{ contains(steps.get-version.outputs.version, '-') }}
run: |
echo Version number must not be a prerelease.
exit 1
- run: npm clean-install
- run: npm run prepublishOnly
- name: Upload tarball artifact
uses: actions/upload-artifact@v3.1.1
with:
name: bundle
path: ./dist
- run: npm pack
- name: Upload tarball artifact
uses: actions/upload-artifact@v3.1.1
with:
name: tarball
path: ./*.tgz
- name: Draft a new release
run: gh release create ${{ github.ref_name }} ./dist/directline.js ./*.tgz --draft --notes-file ./CHANGELOG.md
env:
GH_TOKEN: ${{ github.token }}

publish-package:
environment: production
needs: build-and-draft
runs-on: ubuntu-latest

steps:
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Download tarball artifact
uses: actions/download-artifact@v3.0.1
with:
name: tarball
- id: get-version
name: Get version
run: |
echo package-name=`tar --extract --file=\`ls ./*.tgz\` --to-stdout package/package.json | jq -r .name` >> $GITHUB_OUTPUT
echo version=`tar --extract --file=\`ls ./*.tgz\` --to-stdout package/package.json | jq -r .version` >> $GITHUB_OUTPUT
- run: npm publish --access public `ls ./*.tgz`
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate job summary
run: echo "NPM package has been published to https://npmjs.com/package/${{ steps.get-version.outputs.package-name }}/v/${{ steps.get-version.outputs.version }}." > $GITHUB_STEP_SUMMARY

publish-release:
needs:
- build-and-draft
- publish-package
runs-on: ubuntu-latest

steps:
- name: Publish release
run: gh release edit ${{ github.ref_name }} --draft=false --repo ${{ github.repository }}
env:
GH_TOKEN: ${{ github.token }}
- name: Generate job summary
run: echo "GitHub release created at https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}." >> $GITHUB_STEP_SUMMARY
37 changes: 37 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Pull request validation

on:
pull_request:
branches:
- main
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm clean-install
- run: npm run prepublishOnly
- name: Upload tarball artifact
uses: actions/upload-artifact@v3.1.1
with:
name: bundle
path: ./dist
- run: npm pack
- name: Upload tarball artifact
uses: actions/upload-artifact@v3.1.1
with:
name: tarball
path: ./*.tgz
- run: npm test
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.env
dist
lib
node_modules
.vscode
/.vscode
/*.tgz
/dist
/lib
/node_modules
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Bumped dependencies, by [@compulim](https://github.com/compulim), in PR [#390](https://github.com/microsoft/BotFramework-DirectLineJS/pull/390)
- Development dependencies
- [`restify@11.0.0`](https://npmjs.com/package/restify)
- [`webpack@5.75.0`](https://npmjs.com/package/webpack)

## [0.15.1] - 2022-02-09

### Changed
Expand Down
Loading