Skip to content

Commit 7537284

Browse files
authored
chore: add release (#2)
* add tests for passing options * fix workflows * add node version * size * size * fix sizelimit * workflow' * size * fix branch * size * release * test * test * remove version * tests * on push main
1 parent 8326ee4 commit 7537284

16 files changed

+7376
-2014
lines changed

.github/workflows/pull_request.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test, build, and size limit
1+
name: Test, lint, build
22
on: [pull_request]
33
jobs:
44
build:
@@ -26,3 +26,8 @@ jobs:
2626

2727
- name: Build
2828
run: npm run build
29+
30+
- name: Size Limit
31+
uses: andresz1/size-limit-action@v1
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/size.yml

-17
This file was deleted.
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test and 🚀 Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
name: Build, lint, and test on Node
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version-file: '.nvmrc'
20+
21+
- name: Install deps and build (with cache)
22+
uses: bahmutov/npm-install@v1
23+
24+
- name: Lint
25+
run: npm run lint
26+
27+
- name: Test
28+
run: npm test
29+
30+
- name: Build
31+
run: npm run build
32+
33+
- name: Size Limit
34+
uses: andresz1/size-limit-action@v1
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: 🚀 Release
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
42+
run: |
43+
npm install @semantic-release/changelog @semantic-release/git --ignore-scripts --no-save
44+
npx semantic-release

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ lerna-debug.log*
1010
node_modules
1111
dist
1212
dist-ssr
13+
coverage
1314
*.local
1415

1516
# Editor directories and files

.releaserc.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"branches": [{ "name": "beta", "prerelease": true }],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/github",
7+
"@semantic-release/npm"
8+
]
9+
}

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Vue 3 + TypeScript + Vite
22

3+
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
4+
5+
6+
37
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
48

59
Learn more about the recommended Project Setup and IDE Support in the [Vue Docs TypeScript Guide](https://vuejs.org/guide/typescript/overview.html#project-setup).

0 commit comments

Comments
 (0)