Skip to content

Commit 4772f6c

Browse files
committed
build: init semantic release config
1 parent fa38643 commit 4772f6c

File tree

2 files changed

+54
-3
lines changed

2 files changed

+54
-3
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
permissions: write-all
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: 'lts/*'
21+
- name: Github Action for Yarn
22+
uses: Borales/[email protected]
23+
with:
24+
cmd: install
25+
- name: Release
26+
run: npx semantic-release
27+
env:
28+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
29+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30+
GIT_CREDENTIALS: ${{ secrets.GIT_CREDENTIALS }}

package.json

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,37 @@
11
{
22
"name": "no-more-shorts",
33
"private": true,
4-
"version": "0.0.0",
4+
"version": "0.0.0-development",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
88
"build": "tsc && vite build",
9-
"preview": "vite preview"
9+
"preview": "vite preview",
10+
"semantic-release": "semantic-release"
1011
},
1112
"devDependencies": {
1213
"@types/chrome": "^0.0.243",
1314
"typescript": "^5.0.2",
14-
"vite": "^4.4.5"
15+
"vite": "^4.4.5",
16+
"semantic-release": "^21.1.1"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/odonatojunior/no-more-shorts.git"
21+
},
22+
"release": {
23+
"branches": [
24+
"main"
25+
],
26+
"plugins": [
27+
"@semantic-release/commit-analyzer",
28+
"@semantic-release/release-notes-generator",
29+
"@semantic-release/npm",
30+
"@semantic-release/github"
31+
],
32+
"repositoryUrl": "https://github.com/odonatojunior/no-more-shorts",
33+
"publish": [
34+
"@semantic-release/github"
35+
]
1536
}
1637
}

0 commit comments

Comments
 (0)