Skip to content

Commit

Permalink
Merge pull request #302 from microsoft/auto_deploy
Browse files Browse the repository at this point in the history
Add auto-deploy deploy step
  • Loading branch information
Orta Therox authored and sandersn committed Nov 29, 2021
1 parent 7e59161 commit a80c3eb
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
29 changes: 29 additions & 0 deletions packages/dtslint/.github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to npm

on:
push:
branches:
- main
- master

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
registry-url: "https://registry.npmjs.org"

# Ensure everything is set up right
- run: "npm install"
- run: "npm test"

- uses: orta/npm-should-deploy-action@master
id: check

- run: "npm publish"
if: ${{ steps.check.outputs.should-deploy == "true" }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18 changes: 2 additions & 16 deletions packages/dtslint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,10 @@ npm run watch
Use `npm run test` to run all tests.
To run a single test: `node node_modules/tslint/bin/tslint --rules-dir bin/rules --test test/expect`.


## Publish

#### `production` branch

```sh
npm run push-production
```

This script merges changes from master into `production` and updates the `bin/` directory.
The `production` branch is a dependency of [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) and [types-publisher](https://github.com/Microsoft/types-publisher).

#### NPM

1. Update package.json
2. Follow publish steps except for the `git push` at the end.
3. Make sure you are logged in to npm as typescript.
4. `npm publish`
1. Change the version in the `package.json`
2. Push to master

## Code of Conduct

Expand Down
2 changes: 1 addition & 1 deletion packages/dtslint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dtslint",
"version": "3.6.12",
"version": "3.6.13",
"description": "Runs tests on TypeScript definition files",
"files": [
"bin",
Expand Down

0 comments on commit a80c3eb

Please sign in to comment.