Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

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 Jul 23, 2020
2 parents 495cd8f + cc93dd6 commit 59eeffe
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
29 changes: 29 additions & 0 deletions .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 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 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 59eeffe

Please sign in to comment.