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
69 changes: 69 additions & 0 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
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 version=`tar --extract --file=\`ls ./*.tgz\` --to-stdout package/package.json | jq -r .version` > $GITHUB_OUTPUT
- name: Print version
run: echo ${{ steps.get-version.outputs.version }}
- if: ${{ !contains(steps.get-version.outputs.version, '-') }}
name: Validate version
run: |
echo Cannot publish production version
exit 1
- run: npm publish --tag ${{ github.ref_name }} `ls *.tgz`
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
72 changes: 72 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
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 }} ./*.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
- run: npm publish `ls ./*.tgz`
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

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 }}
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
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 [#XXX](https://github.com/microsoft/BotFramework-DirectLineJS/pull/XXX)
- 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