Skip to content

Commit fcfe6fd

Browse files
chore(ci): release workflow
1 parent 311a6e8 commit fcfe6fd

File tree

5 files changed

+7214
-1178
lines changed

5 files changed

+7214
-1178
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build workflow
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
jobs:
8+
build:
9+
name: build
10+
runs-on: ubuntu-latest
11+
env:
12+
CI_JOB_NUMBER: 1
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v2
16+
with:
17+
cache: npm
18+
node-version: 18
19+
- uses: preactjs/compressed-size-action@v2
20+
with:
21+
pattern: ".dist/**/*.{js,ts,json}"

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
cache: npm
17+
node-version: 18
18+
- run: npm i
19+
- run: npm run build
20+
- run: npm run semantic-release
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.releaserc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"plugins": [
6+
"@semantic-release/commit-analyzer",
7+
"@semantic-release/changelog",
8+
"@semantic-release/npm",
9+
"@semantic-release/git",
10+
"@semantic-release/github"
11+
]
12+
}

0 commit comments

Comments
 (0)