Skip to content

Commit

Permalink
chore(release): add semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkosterr committed Oct 18, 2024
1 parent 02e2413 commit b256e61
Show file tree
Hide file tree
Showing 5 changed files with 3,045 additions and 32 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
branches:
- production

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: yarn install --immutable
- name: Running tests
run: yarn run test
- name: Building
run: yarn run build
- name: Running audit
run: yarn audit signatures
- name: Semantic release
run: npx semantic-release
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ A schema-based form generator component for Vue 3, based on the original
[`vue-form-generator`](https://github.com/vue-generators/vue-form-generator) library.

[![GitHub last commit](https://img.shields.io/github/last-commit/kevinkosterr/vue3-form-generator?logo=github)](https://github.com/kevinkosterr/vue3-form-generator/commits/main/)
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
[![Static Badge](https://img.shields.io/badge/Vue%20version-3.x.x-green?logo=vue.js)](https://vuejs.org)
[![NPM Version](https://img.shields.io/npm/v/%40kevinkosterr%2Fvue3-form-generator?logo=npm)](https://www.npmjs.com/package/@kevinkosterr/vue3-form-generator)
[![GitHub License](https://img.shields.io/github/license/kevinkosterr/vue3-form-generator)](https://github.com/kevinkosterr/vue3-form-generator?tab=MIT-1-ov-file)
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
],
"dependencies": {},
"devDependencies": {
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.0",
"@semantic-release/npm": "^12.0.1",
"@stylistic/eslint-plugin": "^2.8.0",
"@vitejs/plugin-vue": "^5.1.3",
"@vue/test-utils": "^2.4.6",
Expand All @@ -45,6 +48,7 @@
"eslint-plugin-vue": "9.27.0",
"jsdom": "^25.0.1",
"sass": "^1.79.5",
"semantic-release": "^24.1.2",
"terser": "^5.33.0",
"typescript": "^5.4.5",
"vite": "^5.2.14",
Expand Down
18 changes: 18 additions & 0 deletions release.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* @type {import('semantic-release').GlobalConfig}
*/
export default {
branches: [ 'production' ],
tagFormat: '${version}',
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[ '@semantic-release/git', {
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
} ],
'@semantic-release/npm',
[ '@semantic-release/github', {
assets: [ { path: 'dist/*', label: 'Distribution Files' } ]
} ]
]
}
Loading

0 comments on commit b256e61

Please sign in to comment.