Skip to content

Commit

Permalink
ci: upgrade ci url and documentation (#39)
Browse files Browse the repository at this point in the history
### Description

Upgrade CI configs, modify all `bsc` and `BNB` configs.
  • Loading branch information
DarianShawn authored Oct 23, 2023
1 parent b810754 commit 2a25ece
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 101 deletions.
34 changes: 17 additions & 17 deletions .github/commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
const validateTypeNums = (parsedCommit) => {
const mergePrefix = "Merge pull request"
if (parsedCommit.raw.startsWith(mergePrefix)) {
console.log('this is a merge commit:' + parsedCommit.raw)
return [true,'']
}
const mergePrefix = "Merge pull request"
if (parsedCommit.raw.startsWith(mergePrefix)) {
console.log('this is a merge commit:' + parsedCommit.raw)
return [true, '']
}

if (!parsedCommit.type) {
return [false, 'invalid commit message, should be like "name: descriptions.", yours: "' + parsedCommit.raw + '"']
}
if (!parsedCommit.type) {
return [false, 'invalid commit message, should be like "name: descriptions.", yours: "' + parsedCommit.raw + '"']
}

const types = parsedCommit.type.split(' ')
for (var i=0;i<types.length;i++){
if ((types[i].toLowerCase() == "wip") || (types[i].toLowerCase() == "r4r")) {
return [false, 'R4R or WIP is not acceptable, no matter upper case or lower case']
}
const types = parsedCommit.type.split(' ')
for (var i = 0; i < types.length; i++) {
if ((types[i].toLowerCase() == "wip") || (types[i].toLowerCase() == "r4r")) {
return [false, 'R4R or WIP is not acceptable, no matter upper case or lower case']
}
return [true,'']
}
return [true, '']
}


module.exports = {
Expand All @@ -28,8 +28,8 @@ module.exports = {
extends: ['@commitlint/config-conventional'],
plugins: ['commitlint-plugin-function-rules'],
rules: {
'subject-empty':[2, 'always'],
'scope-empty':[2, 'always'],
'subject-empty': [2, 'always'],
'scope-empty': [2, 'always'],
'type-enum': [2, 'never'],
'type-case': [0, 'always'],
'function-rules/type-case': [2, 'always', validateTypeNums],
Expand All @@ -40,5 +40,5 @@ module.exports = {
],
},
helpUrl:
'https://github.com/bnb-chain/bsc/tree/develop/docs/lint/commit.md',
'https://github.com/dogechain-lab/dbsc/tree/dev/docs/lint/commit.md',
}
3 changes: 1 addition & 2 deletions .github/release.env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
MAINNET_FILE_URL="https://github.com/binance-chain/bsc/releases/latest/download/mainnet.zip"
TESTNET_FILE_URL="https://github.com/binance-chain/bsc/releases/latest/download/testnet.zip"
MAINNET_FILE_URL="https://github.com/dogechain-lab/dbsc/releases/latest/download/mainnet.zip"
23 changes: 10 additions & 13 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
# Publish `pre-v1.2.3` tags as releases.
tags:
- 'pre-*'
- "pre-*"

jobs:
build:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
with:
name: macos
path: ./build/bin/geth

- name: Upload Windows Build
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
Expand All @@ -90,7 +90,7 @@ jobs:
with:
name: arm5
path: ./build/bin/geth-linux-arm-5

- name: Upload ARM-6 Build
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -132,50 +132,48 @@ jobs:
with:
name: linux
path: ./linux

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: macos
path: ./macos

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: windows
path: ./windows

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm5
path: ./arm5

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm6
path: ./arm6

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm7
path: ./arm7

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm64
path: ./arm64

- name: Download Config File
run: |
. ./.github/release.env
echo "mainnet.zip url: $MAINNET_FILE_URL"
echo "testnet.zip url: $TESTNET_FILE_URL"
curl -L $MAINNET_FILE_URL -o ./mainnet.zip
curl -L $TESTNET_FILE_URL -o ./testnet.zip
# ==============================
# Create release
# ==============================
Expand All @@ -200,7 +198,6 @@ jobs:
prerelease: true
files: |
./mainnet.zip
./testnet.zip
./linux/geth_linux
./macos/geth_macos
./windows/geth_windows.exe
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
with:
name: macos
path: ./build/bin/geth

- name: Upload Windows Build
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest'
Expand All @@ -90,7 +90,7 @@ jobs:
with:
name: arm5
path: ./build/bin/geth-linux-arm-5

- name: Upload ARM-6 Build
uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -132,50 +132,48 @@ jobs:
with:
name: linux
path: ./linux

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: macos
path: ./macos

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: windows
path: ./windows

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm5
path: ./arm5

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm6
path: ./arm6

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm7
path: ./arm7

- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: arm64
path: ./arm64

- name: Download Config File
run: |
. ./.github/release.env
echo "mainnet.zip url: $MAINNET_FILE_URL"
echo "testnet.zip url: $TESTNET_FILE_URL"
curl -L $MAINNET_FILE_URL -o ./mainnet.zip
curl -L $TESTNET_FILE_URL -o ./testnet.zip
# ==============================
# Create release
# ==============================
Expand Down Expand Up @@ -207,7 +205,6 @@ jobs:
prerelease: false
files: |
./mainnet.zip
./testnet.zip
./linux/geth_linux
./macos/geth_macos
./windows/geth_windows.exe
Expand Down
Loading

0 comments on commit 2a25ece

Please sign in to comment.