mirror of
https://github.com/scratchfoundation/scratch-render-fonts.git
synced 2025-06-16 17:00:07 -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
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
- name: Setup Deploy
|
||||
run: |
|
||||
echo "export NPM_TAG=latest" >> $GITHUB_ENV
|
||||
echo "export NODE_ENV=production" >> $GITHUB_ENV
|
||||
echo "export RELEASE_TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
|
||||
npm run build
|
||||
VPKG=$($(npm bin)/json -f package.json version)
|
||||
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
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Release
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: npx --no -- semantic-release
|
||||
|
|
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",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/scratchfoundation/scratch-render-fonts.git"
|
||||
"url": "https://git@github.com/scratchfoundation/scratch-render-fonts.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run clean && webpack --progress --bail",
|
||||
|
@ -37,6 +37,7 @@
|
|||
"json": "^10.0.0",
|
||||
"lodash.defaultsdeep": "4.6.1",
|
||||
"rimraf": "^2.6.1",
|
||||
"scratch-semantic-release-config": "1.0.8",
|
||||
"webpack": "^4.43.0",
|
||||
"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