Skip to content

Commit 9feca86

Browse files
committed
fix: add index.ts
1 parent fb33a7e commit 9feca86

File tree

7 files changed

+11390
-0
lines changed

7 files changed

+11390
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: make-release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
persist-credentials: false
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '18'
24+
registry-url: 'https://registry.npmjs.org'
25+
26+
- name: Install dependencies and build 🔧
27+
run: npm ci && npm run build
28+
29+
- name: Make Release
30+
run: npx semantic-release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Build folders
2+
build/
3+
14
# Logs
25
logs
36
*.log

.releaserc.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
const ref = process.env.GITHUB_REF;
2+
const branch = ref.split('/').pop();
3+
4+
function getPlugins() {
5+
if (branch === 'master') {
6+
return [
7+
'@semantic-release/commit-analyzer',
8+
'@semantic-release/release-notes-generator',
9+
['@semantic-release/changelog', { changelogFile: 'CHANGELOG.md' }],
10+
['@semantic-release/npm'],
11+
['@semantic-release/git', {
12+
assets: ['CHANGELOG.md', 'package.json'],
13+
message: '${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}',
14+
}],
15+
'@semantic-release/github',
16+
];
17+
}
18+
19+
return [
20+
'@semantic-release/commit-analyzer',
21+
'@semantic-release/release-notes-generator',
22+
['@semantic-release/npm'],
23+
['@semantic-release/git', {
24+
assets: ['package.json'],
25+
message: '${nextRelease.version} CHANGELOG [skip ci]\n\n${nextRelease.notes}',
26+
}],
27+
'@semantic-release/github',
28+
];
29+
}
30+
31+
module.exports = {
32+
branches: [
33+
'master',
34+
{ name: 'dev', prerelease: true, },
35+
],
36+
plugins: getPlugins(),
37+
}

0 commit comments

Comments
 (0)