Skip to content

Commit ac43f61

Browse files
committed
Create security policy, publish script for lts
Resolves #1857
1 parent 122fd72 commit ac43f61

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Before submitting a pull request, make sure that there are no linting problems (
129129

130130
If your change is user facing, consider updating `CHANGELOG.md` to describe the change you have made. If you don't, the maintainer who merges your pull request will do it for you.
131131
132-
Please do not change the project version number in a pull request.
132+
Please do not change the project version number in a pull request unless submitting a patch to the `lts` branch.
133133
134134
## Updating Your Branch
135135

.github/SECURITY.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The TypeDoc team supports the latest minor version. For one minor version prior to the latest,
6+
pull requests providing patches to fix security vulnerabilities will be accepted. Support for the
7+
previous minor version relies completely on community pull requests.
8+
9+
| Version | Status |
10+
| ------- | ------------------ |
11+
| 0.22.x | :white_check_mark: |
12+
| 0.21.x | :warning: |
13+
| < 0.21 | :x: |
14+
15+
## Patching LTS Versions
16+
17+
If you depend on the prior minor version of TypeDoc and want to submit a fix, submit a pull request
18+
to the `lts` branch. When merged, a new version will be automatically published with your patch.
19+
20+
Be sure to include:
21+
22+
- A line in `CHANGELOG.md` that notes what changed.
23+
- An update to the version field in `package.json`.
24+
25+
Note: Only pull requests which fix security vulnerabilities will be accepted. Additional features and bug fixes are out of scope for old versions.

.github/workflows/publish-lts.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish LTS
2+
on:
3+
push:
4+
branches:
5+
- lts
6+
jobs:
7+
npm-publish:
8+
name: npm-publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v2
13+
- id: check
14+
uses: EndBug/version-check@v1
15+
with:
16+
diff-search: true
17+
- name: Set up Node
18+
if: steps.check.outputs.changed == 'true'
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: "16"
22+
- name: Upgrade npm
23+
if: steps.check.outputs.changed == 'true'
24+
run: npm i -g npm@latest
25+
- name: Install
26+
if: steps.check.outputs.changed == 'true'
27+
run: npm ci
28+
- name: Setup publish token
29+
if: steps.check.outputs.changed == 'true'
30+
run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
31+
env:
32+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
33+
- name: Publish
34+
if: steps.check.outputs.changed == 'true'
35+
run: npm publish --tag lts

0 commit comments

Comments
 (0)