build: setup semantic release and switch to github actions
This commit is contained in:
parent
0ebd876c67
commit
c1e474e025
|
@ -0,0 +1,32 @@
|
||||||
|
name: Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
- "develop-*"
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set Repo Origin
|
||||||
|
run: git remote set origin https://git.lumeweb.com/LumeWeb/relay.git
|
||||||
|
- uses: webfactory/ssh-agent@v0.7.0
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.GITEA_SSH_KEY }}
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "lts/*"
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Release
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
run: npx semantic-release
|
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator",
|
||||||
|
"@semantic-release/changelog",
|
||||||
|
[
|
||||||
|
"@semantic-release/npm",
|
||||||
|
{
|
||||||
|
"npmPublish": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"@semantic-release/git",
|
||||||
|
{
|
||||||
|
"assets": [
|
||||||
|
"package.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"branches": [
|
||||||
|
"master",
|
||||||
|
{
|
||||||
|
name: "develop",
|
||||||
|
prerelease: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "develop-*",
|
||||||
|
prerelease: true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
|
@ -1,49 +0,0 @@
|
||||||
pipeline:
|
|
||||||
build:
|
|
||||||
image: git.lumeweb.com/lumeweb/ci-node
|
|
||||||
commands:
|
|
||||||
- corepack enable
|
|
||||||
- corepack prepare yarn@stable --activate
|
|
||||||
- yarn
|
|
||||||
- yarn build
|
|
||||||
package:
|
|
||||||
image: ghcr.io/goreleaser/nfpm
|
|
||||||
commands:
|
|
||||||
- nfpm pkg --packager deb
|
|
||||||
publish_focal:
|
|
||||||
image: git.lumeweb.com/lumeweb/aptly-publisher
|
|
||||||
settings:
|
|
||||||
apt_username:
|
|
||||||
from_secret: APT_USERNAME
|
|
||||||
apt_password:
|
|
||||||
from_secret: APT_PASSWORD
|
|
||||||
repo: apt.web3relay.io
|
|
||||||
folder: ubuntu
|
|
||||||
distro: focal
|
|
||||||
gpg_password:
|
|
||||||
from_secret: GPG_PASSWORD
|
|
||||||
publish_jammy:
|
|
||||||
image: git.lumeweb.com/lumeweb/aptly-publisher
|
|
||||||
settings:
|
|
||||||
apt_username:
|
|
||||||
from_secret: APT_USERNAME
|
|
||||||
apt_password:
|
|
||||||
from_secret: APT_PASSWORD
|
|
||||||
repo: apt.web3relay.io
|
|
||||||
folder: ubuntu
|
|
||||||
distro: jammy
|
|
||||||
gpg_password:
|
|
||||||
from_secret: GPG_PASSWORD
|
|
||||||
purge_do_cdn:
|
|
||||||
image: git.lumeweb.com/lumeweb/do-cdn-purge
|
|
||||||
settings:
|
|
||||||
DIGITALOCEAN_ACCESS_TOKEN:
|
|
||||||
from_secret: digitalocean_access_token
|
|
||||||
DIGITALOCEAN_CDN_ID:
|
|
||||||
from_secret: digitalocean_cdn_id
|
|
||||||
purge_cf_cdn:
|
|
||||||
image: git.lumeweb.com/lumeweb/cf-cdn-purge
|
|
||||||
settings:
|
|
||||||
CLOUDFLARE_ACCESS_TOKEN:
|
|
||||||
from_secret: cloudflare_access_token
|
|
||||||
DOMAIN: web3relay.io
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,14 +1,18 @@
|
||||||
{
|
{
|
||||||
"name": "@lumeweb/relay",
|
"name": "@lumeweb/relay",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"version": "0.1.0",
|
"version": "0.0.0-development",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "build/index.js",
|
"main": "build/index.js",
|
||||||
|
"repository": {
|
||||||
|
"url": "https://git.lumeweb.com/LumeWeb/relay.git"
|
||||||
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Derrick Hammer",
|
"name": "Derrick Hammer",
|
||||||
"email": "contact@lumeweb.com"
|
"email": "contact@lumeweb.com"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"semantic-release": "semantic-release",
|
||||||
"compile": "npm run tsc",
|
"compile": "npm run tsc",
|
||||||
"prebuild": "bash prebuild.sh",
|
"prebuild": "bash prebuild.sh",
|
||||||
"package": "pkg -c pkg.json build/index.js -t linux --public --no-native-build -C gzip",
|
"package": "pkg -c pkg.json build/index.js -t linux --public --no-native-build -C gzip",
|
||||||
|
@ -49,6 +53,7 @@
|
||||||
"sodium-universal": "^4.0.0"
|
"sodium-universal": "^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@semantic-release/changelog": "^6.0.3",
|
||||||
"@types/b4a": "^1.6.0",
|
"@types/b4a": "^1.6.0",
|
||||||
"@types/minimatch": "^3.0.5",
|
"@types/minimatch": "^3.0.5",
|
||||||
"@types/node-fetch": "^2.6.3",
|
"@types/node-fetch": "^2.6.3",
|
||||||
|
@ -58,6 +63,7 @@
|
||||||
"pkg": "^5.8.1",
|
"pkg": "^5.8.1",
|
||||||
"prebuildify": "^5.0.1",
|
"prebuildify": "^5.0.1",
|
||||||
"prettier": "^2.8.7",
|
"prettier": "^2.8.7",
|
||||||
|
"semantic-release": "21",
|
||||||
"supports-color": "github:LumeWeb/supports-color",
|
"supports-color": "github:LumeWeb/supports-color",
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^4.9.5"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue