mirror of
https://github.com/Expand-sys/ccash-client-js
synced 2026-03-22 20:37:09 +11:00
ci: add publish workflow
This commit is contained in:
parent
dc1285d742
commit
80f106c113
7 changed files with 3236 additions and 41 deletions
35
.github/workflows/publish.yaml
vendored
Normal file
35
.github/workflows/publish.yaml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
name: Publish
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- stable
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '15.x'
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: '**/node_modules'
|
||||||
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
- run: yarn --no-progress
|
||||||
|
- run: yarn build
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '15.x'
|
||||||
|
registry-url: 'https://npm.pkg.github.com'
|
||||||
|
scope: '@simplestream'
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: '**/node_modules'
|
||||||
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
- run: yarn --no-progress
|
||||||
|
- run: yarn release
|
||||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
_
|
||||||
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx commitlint -E HUSKY_GIT_PARAMS
|
||||||
1
commitlint.config.js
Normal file
1
commitlint.config.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
module.exports = { extends: ['@commitlint/config-conventional'] };
|
||||||
10
package.json
10
package.json
|
|
@ -11,11 +11,13 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"prepare": "husky install",
|
||||||
"clean": "rm -rf dist",
|
"clean": "rm -rf dist",
|
||||||
"build": "npm run clean && tsc",
|
"build": "npm run clean && tsc",
|
||||||
"dev": "npm run clean && npm run build -- --watch",
|
"dev": "npm run clean && npm run build -- --watch",
|
||||||
"format": "prettier --write 'src/**/*'",
|
"format": "prettier --write 'src/**/*'",
|
||||||
"test": "jest"
|
"test": "jest",
|
||||||
|
"release": "semantic-release"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
|
|
@ -25,10 +27,16 @@
|
||||||
"@babel/core": "^7.14.5",
|
"@babel/core": "^7.14.5",
|
||||||
"@babel/preset-env": "^7.14.5",
|
"@babel/preset-env": "^7.14.5",
|
||||||
"@babel/preset-typescript": "^7.14.5",
|
"@babel/preset-typescript": "^7.14.5",
|
||||||
|
"@commitlint/cli": "^12.1.4",
|
||||||
|
"@commitlint/config-conventional": "^12.1.4",
|
||||||
|
"@semantic-release/changelog": "^5.0.1",
|
||||||
|
"@semantic-release/git": "^9.0.0",
|
||||||
"@types/jest": "^26.0.23",
|
"@types/jest": "^26.0.23",
|
||||||
"babel-jest": "^27.0.2",
|
"babel-jest": "^27.0.2",
|
||||||
|
"husky": "^6.0.0",
|
||||||
"jest": "^27.0.4",
|
"jest": "^27.0.4",
|
||||||
"prettier": "^2.3.1",
|
"prettier": "^2.3.1",
|
||||||
|
"semantic-release": "^17.4.3",
|
||||||
"ts-loader": "^9.2.3",
|
"ts-loader": "^9.2.3",
|
||||||
"ts-node": "^10.0.0",
|
"ts-node": "^10.0.0",
|
||||||
"typescript": "^4.3.2"
|
"typescript": "^4.3.2"
|
||||||
|
|
|
||||||
31
release.config.js
Normal file
31
release.config.js
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
module.exports = {
|
||||||
|
branches: ['stable'],
|
||||||
|
plugins: {
|
||||||
|
commitAnalyzer: [
|
||||||
|
'@semantic-release/commit-analyzer',
|
||||||
|
{
|
||||||
|
releaseRules: [
|
||||||
|
{ type: 'style', release: 'patch' },
|
||||||
|
{ type: 'chore', release: 'patch' },
|
||||||
|
{ type: 'docs', release: 'patch' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
releaseNotes: '@semantic-release/release-notes-generator',
|
||||||
|
changelog: [
|
||||||
|
'@semantic-release/changelog',
|
||||||
|
{
|
||||||
|
changelogFile: 'CHANGELOG.md',
|
||||||
|
changelogTitle: '# CHANGELOG',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
github: '@semantic-release/github',
|
||||||
|
npm: '@semantic-release/npm',
|
||||||
|
git: [
|
||||||
|
'@semantic-release/git',
|
||||||
|
{
|
||||||
|
assets: ['CHANGELOG.md', 'package.json'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
Loading…
Reference in a new issue