Skip to content

Commit cf60f47

Browse files
Merge pull request #1 from httpland/beta
Beta
2 parents 0deb5af + 055004d commit cf60f47

File tree

16 files changed

+627
-14
lines changed

16 files changed

+627
-14
lines changed

.github/workflows/release-npm.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: release-npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ${{ matrix.os }}
10+
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
deno: [v1.x]
15+
node: [16.x]
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- uses: denoland/setup-deno@v1
22+
with:
23+
deno-version: ${{ matrix.deno }}
24+
25+
- name: Cache node_modules
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.pnpm-store
29+
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
30+
restore-keys: |
31+
${{ runner.os }}-
32+
33+
- uses: pnpm/[email protected]
34+
with:
35+
version: 7.16.0
36+
run_install: |
37+
- recursive: true
38+
args: [--frozen-lockfile, --prefer-offline, --ignore-scripts]
39+
40+
- name: Get tag version
41+
if: startsWith(github.ref, 'refs/tags/')
42+
id: get_tag_version
43+
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
44+
45+
- uses: actions/setup-node@v2
46+
with:
47+
node-version: ${{ matrix.node }}
48+
registry-url: 'https://registry.npmjs.org'
49+
50+
- name: build
51+
run: deno run -A ./_tools/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
52+
53+
- name: publish
54+
env:
55+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
56+
run: deno run -A ./_tools/publish_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
57+

.github/workflows/release.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- beta
7+
- main
8+
9+
jobs:
10+
lint:
11+
runs-on: ${{ matrix.os }}
12+
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
deno: [v1.x]
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
22+
- uses: denoland/setup-deno@v1
23+
with:
24+
deno-version: ${{ matrix.deno }}
25+
26+
- name: Lint
27+
run: |
28+
deno fmt --check
29+
deno lint
30+
31+
test:
32+
runs-on: ${{ matrix.os }}
33+
34+
strategy:
35+
matrix:
36+
os: [ubuntu-latest]
37+
deno: [v1.x]
38+
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v3
42+
43+
- uses: denoland/setup-deno@v1
44+
with:
45+
deno-version: ${{ matrix.deno }}
46+
47+
- name: Test
48+
run: deno task test --coverage=coverage
49+
50+
- name: Generate coverage
51+
if: ${{ matrix.deno == 'v1.x' }}
52+
run: deno task coverage coverage --output=cov_profile.lcov --lcov
53+
54+
- uses: codecov/codecov-action@v3
55+
if: ${{ matrix.deno == 'v1.x' }}
56+
with:
57+
files: cov_profile.lcov
58+
59+
release:
60+
needs: [lint, test]
61+
runs-on: ${{ matrix.os }}
62+
63+
strategy:
64+
matrix:
65+
os: [ubuntu-latest]
66+
67+
steps:
68+
- name: Checkout
69+
uses: actions/checkout@v3
70+
with:
71+
token: ${{ secrets.GH_TOKEN }}
72+
73+
- uses: cycjimmy/semantic-release-action@v3
74+
with:
75+
extra_plugins: |
76+
@semantic-release/changelog
77+
@semantic-release/git
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

.releaserc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"branches": [
3+
"main",
4+
{
5+
"name": "beta",
6+
"prerelease": true
7+
}
8+
],
9+
"plugins": [
10+
"@semantic-release/commit-analyzer",
11+
"@semantic-release/release-notes-generator",
12+
"@semantic-release/changelog",
13+
"@semantic-release/github",
14+
[
15+
"@semantic-release/git",
16+
{
17+
"assets": [
18+
"CHANGELOG.md"
19+
],
20+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
21+
}
22+
]
23+
],
24+
"tagFormat": "${version}"
25+
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# [1.0.0-beta.2](https://github.com/httpland/chain-handler/compare/1.0.0-beta.1...1.0.0-beta.2) (2023-02-05)
2+
3+
4+
### Features
5+
6+
* **types.ts:** rename types from `NextHandler` to `OptionalHandler` ([f6720cb](https://github.com/httpland/chain-handler/commit/f6720cb85695cf44165f5e14d6a5bfcb4b19d8bc))
7+
8+
# 1.0.0-beta.1 (2023-02-04)
9+
10+
11+
### Features
12+
13+
* **chain.ts:** add minimal chainable interface and implementation ([0deb5af](https://github.com/httpland/chain-handler/commit/0deb5afbb26edc0342320a17261a0d93465c22f6))

0 commit comments

Comments
 (0)