mirror of
https://github.com/scratchfoundation/scratch-render-fonts.git
synced 2025-06-26 22:00:24 -04:00
ci: use semantic-release
This commit is contained in:
parent
b925940ef2
commit
110f9a224e
4 changed files with 8941 additions and 20 deletions
21
.github/workflows/ci-cd.yml
vendored
21
.github/workflows/ci-cd.yml
vendored
|
@ -38,17 +38,10 @@ jobs:
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Setup Deploy
|
- name: Build
|
||||||
run: |
|
run: npm run build
|
||||||
echo "export NPM_TAG=latest" >> $GITHUB_ENV
|
- name: Release
|
||||||
echo "export NODE_ENV=production" >> $GITHUB_ENV
|
env:
|
||||||
echo "export RELEASE_TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
npm run build
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
VPKG=$($(npm bin)/json -f package.json version)
|
run: npx --no -- semantic-release
|
||||||
echo "export VERSION=${VPKG}-prerelease.$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
|
|
||||||
- name: Deploy
|
|
||||||
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/hotfix') || startsWith(github.ref, 'refs/heads/release'))
|
|
||||||
run: |
|
|
||||||
npm --no-git-tag-version version $VERSION
|
|
||||||
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
||||||
npm publish
|
|
||||||
|
|
8924
package-lock.json
generated
8924
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -7,7 +7,7 @@
|
||||||
"homepage": "https://github.com/scratchfoundation/scratch-render-fonts#readme",
|
"homepage": "https://github.com/scratchfoundation/scratch-render-fonts#readme",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+ssh://git@github.com/scratchfoundation/scratch-render-fonts.git"
|
"url": "https://git@github.com/scratchfoundation/scratch-render-fonts.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run clean && webpack --progress --bail",
|
"build": "npm run clean && webpack --progress --bail",
|
||||||
|
@ -37,6 +37,7 @@
|
||||||
"json": "^10.0.0",
|
"json": "^10.0.0",
|
||||||
"lodash.defaultsdeep": "4.6.1",
|
"lodash.defaultsdeep": "4.6.1",
|
||||||
"rimraf": "^2.6.1",
|
"rimraf": "^2.6.1",
|
||||||
|
"scratch-semantic-release-config": "1.0.8",
|
||||||
"webpack": "^4.43.0",
|
"webpack": "^4.43.0",
|
||||||
"webpack-cli": "^3.3.11"
|
"webpack-cli": "^3.3.11"
|
||||||
}
|
}
|
||||||
|
|
13
release.config.js
Normal file
13
release.config.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
module.exports = {
|
||||||
|
extends: 'scratch-semantic-release-config',
|
||||||
|
branches: [
|
||||||
|
{
|
||||||
|
name: 'master'
|
||||||
|
// default channel
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'hotfix/*',
|
||||||
|
channel: 'hotfix'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue