diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d1f14b2..dfb5e2d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,4 +1,4 @@ -name: Test, build, and size limit +name: Test, lint, build on: [pull_request] jobs: build: @@ -26,3 +26,8 @@ jobs: - name: Build run: npm run build + + - name: Size Limit + uses: andresz1/size-limit-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml deleted file mode 100644 index 3c65328..0000000 --- a/.github/workflows/size.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "size" -on: - pull_request: - branches: - - main -permissions: - pull-requests: write -jobs: - size: - runs-on: ubuntu-latest - env: - CI_JOB_NUMBER: 1 - steps: - - uses: actions/checkout@v1 - - uses: andresz1/size-limit-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test_and_release.yml b/.github/workflows/test_and_release.yml new file mode 100644 index 0000000..3a823bf --- /dev/null +++ b/.github/workflows/test_and_release.yml @@ -0,0 +1,44 @@ +name: Test and 🚀 Release +on: + push: + branches: + - main +jobs: + build: + name: Build, lint, and test on Node + + runs-on: ubuntu-latest + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + + - name: Install deps and build (with cache) + uses: bahmutov/npm-install@v1 + + - name: Lint + run: npm run lint + + - name: Test + run: npm test + + - name: Build + run: npm run build + + - name: Size Limit + uses: andresz1/size-limit-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: 🚀 Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + npm install @semantic-release/changelog @semantic-release/git --ignore-scripts --no-save + npx semantic-release \ No newline at end of file diff --git a/.gitignore b/.gitignore index f9262fe..3221b8e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ lerna-debug.log* node_modules dist dist-ssr +coverage *.local # Editor directories and files diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..dc1e20a --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,9 @@ +{ + "branches": [{ "name": "beta", "prerelease": true }], + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + "@semantic-release/github", + "@semantic-release/npm" + ] + } \ No newline at end of file diff --git a/README.md b/README.md index 33895ab..0a49e14 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Vue 3 + TypeScript + Vite +[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) + + + This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `