chore: clean up the repo (#3298)
This commit is contained in:
Родитель
299a902c57
Коммит
8369c9a71c
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-format": {
|
||||
"version": "4.1.131201",
|
||||
"commands": [
|
||||
"dotnet-format"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -118,14 +118,6 @@ jobs:
|
|||
- name: Push to MyGet package registry
|
||||
run: dotnet nuget push './publish/*.nupkg' --source https://www.myget.org/F/ant-design-blazor/api/v3/index.json --api-key ${{ secrets.MYGET_API_KEY }} --skip-duplicate
|
||||
|
||||
- name: Sync to Gitee 💕
|
||||
uses: wearerequired/git-mirror-action@master
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
with:
|
||||
source-repo: "git@github.com:ant-design-blazor/ant-design-blazor.git"
|
||||
destination-repo: "git@gitee.com:ant-design-blazor/ant-design-blazor.git"
|
||||
|
||||
- name: Publish Docs 🎉
|
||||
run: |
|
||||
npm install
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
name: Automatic Rebase
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
rebase:
|
||||
name: Rebase
|
||||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Automatic Rebase
|
||||
uses: cirrus-actions/rebase@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
|
||||
|
||||
# https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250
|
||||
always_job:
|
||||
name: Always run job
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Always run
|
||||
run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped."
|
|
@ -72,29 +72,29 @@ jobs:
|
|||
skip_api_build: true
|
||||
skip_app_build: true
|
||||
|
||||
- name: Deploy to Gitee 🚀
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GH_PUSH_TOKEN }}
|
||||
publish_branch: gh-pages
|
||||
publish_dir: ./cargo/wwwroot
|
||||
force_orphan: true
|
||||
# - name: Deploy to Gitee 🚀
|
||||
# uses: peaceiris/actions-gh-pages@v3
|
||||
# with:
|
||||
# github_token: ${{ secrets.GH_PUSH_TOKEN }}
|
||||
# publish_branch: gh-pages
|
||||
# publish_dir: ./cargo/wwwroot
|
||||
# force_orphan: true
|
||||
|
||||
- name: Deploy to Github.io 🚀
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
personal_token: ${{ secrets.GH_PUSH_TOKEN }}
|
||||
external_repository: ant-design-blazor/ant-design-blazor.github.io
|
||||
publish_branch: master
|
||||
publish_dir: ./cargo/wwwroot
|
||||
cname: antblazor.com
|
||||
force_orphan: true
|
||||
tag_name: ${{ steps.publish.outputs.package_version }}
|
||||
# - name: Deploy to Github.io 🚀
|
||||
# uses: peaceiris/actions-gh-pages@v3
|
||||
# with:
|
||||
# personal_token: ${{ secrets.GH_PUSH_TOKEN }}
|
||||
# external_repository: ant-design-blazor/ant-design-blazor.github.io
|
||||
# publish_branch: master
|
||||
# publish_dir: ./cargo/wwwroot
|
||||
# cname: antblazor.com
|
||||
# force_orphan: true
|
||||
# tag_name: ${{ steps.publish.outputs.package_version }}
|
||||
|
||||
- name: Sync to Gitee 💕
|
||||
uses: wearerequired/git-mirror-action@master
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
with:
|
||||
source-repo: "git@github.com:ant-design-blazor/ant-design-blazor.git"
|
||||
destination-repo: "git@gitee.com:ant-design-blazor/ant-design-blazor.git"
|
||||
# - name: Sync to Gitee 💕
|
||||
# uses: wearerequired/git-mirror-action@master
|
||||
# env:
|
||||
# SSH_PRIVATE_KEY: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
# with:
|
||||
# source-repo: "git@github.com:ant-design-blazor/ant-design-blazor.git"
|
||||
# destination-repo: "git@gitee.com:ant-design-blazor/ant-design-blazor.git"
|
|
@ -1,47 +0,0 @@
|
|||
name: Sonar analyze
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Preview Start"]
|
||||
types:
|
||||
- completed
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.11
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~\sonar\cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
- name: Cache SonarCloud scanner
|
||||
id: cache-sonar-scanner
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: .\.sonar\scanner
|
||||
key: ${{ runner.os }}-sonar-scanner
|
||||
restore-keys: ${{ runner.os }}-sonar-scanner
|
||||
- name: Install SonarCloud scanner
|
||||
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
|
||||
shell: powershell
|
||||
run: |
|
||||
New-Item -Path .\.sonar\scanner -ItemType Directory
|
||||
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
|
||||
- name: Build and analyze
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
shell: powershell
|
||||
run: |
|
||||
.\.sonar\scanner\dotnet-sonarscanner begin /k:"ant-design-blazor_ant-design-blazor" /o:"ant-design-blazor" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
|
||||
npm install
|
||||
dotnet build
|
||||
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
|
|
@ -1,3 +1,6 @@
|
|||
License notice for ant-design
|
||||
------------------------------------
|
||||
|
||||
MIT LICENSE
|
||||
|
||||
Copyright (c) 2015-present Ant UED, https://xtech.antfin.com/
|
|
@ -1,41 +0,0 @@
|
|||
'use strict';
|
||||
const message = process.env['HUSKY_GIT_PARAMS'];
|
||||
const fs = require('fs');
|
||||
|
||||
const types = ['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'release', 'revert', 'style', 'test'];
|
||||
|
||||
const scopes = ['showcase', 'packaging', 'changelog', 'schematics', 'module:*'];
|
||||
|
||||
function parseMessage(message) {
|
||||
const PATTERN = /^(\w+)(?:\(([^)]+)\))?\: (.+)$/;
|
||||
const match = PATTERN.exec(message);
|
||||
if (!match) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
type: match[1] || null,
|
||||
scope: match[2] || null,
|
||||
};
|
||||
}
|
||||
|
||||
function getScopesRule() {
|
||||
const messages = fs.readFileSync(message, { encoding: 'utf-8' });
|
||||
const parsed = parseMessage(messages.split('\n')[0]);
|
||||
if (!parsed) {
|
||||
return [2, 'always', scopes];
|
||||
}
|
||||
const { scope, type } = parsed;
|
||||
if (scope && !scopes.includes(scope) && type !== 'release' && !/module:.+/.test(scope)) {
|
||||
return [2, 'always', scopes];
|
||||
} else {
|
||||
return [2, 'always', []];
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
rules: {
|
||||
'type-enum': [2, 'always', types],
|
||||
'scope-enum': getScopesRule,
|
||||
},
|
||||
};
|
Загрузка…
Ссылка в новой задаче