build: setup semantic release

This commit is contained in:
Jonas Gloning 2022-10-29 20:39:31 +02:00
parent c117b8ec65
commit ff49ad2b0a
No known key found for this signature in database
GPG Key ID: 684639B5E59E7614
4 changed files with 10166 additions and 36 deletions

36
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: Release
on:
push:
branches:
- rc
- stable
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "lts/*"
- name: Install dependencies
run: npm ci
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }}
GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }}
run: npx semantic-release

11
.releaserc.json Normal file
View File

@ -0,0 +1,11 @@
{
"branches": ["stable", { "name": "rc", "prerelease": true }],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github"
]
}

10145
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "peer",
"version": "0.6.1",
"version": "0.0.0-development",
"description": "PeerJS server component",
"main": "dist/src/index.js",
"bin": {
@ -22,7 +22,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/peers/peerjs-server.git"
"url": "https://github.com/peers/peerjs-server.git"
},
"author": "Michelle Bu, Eric Zhang, Alex Sosnovskiy",
"license": "MIT",
@ -36,7 +36,8 @@
"test": "npm run lint && mocha -r ts-node/register \"test/**/*\"",
"start": "bin/peerjs --port ${PORT:=9000}",
"dev:start": "npm-run-all build start",
"dev": "nodemon --watch src -e ts --exec npm run dev:start"
"dev": "nodemon --watch src -e ts --exec npm run dev:start",
"semantic-release": "semantic-release"
},
"release": {
"branch": "master"
@ -68,7 +69,8 @@
"rimraf": "^3.0.2",
"sinon": "^7.5.0",
"ts-node": "^8.7.0",
"typescript": "^4.1.2"
"typescript": "^4.1.2",
"semantic-release": "^19.0.5"
},
"engines": {
"node": ">=10"