chore: fix cmd for preview site and style sync

This commit is contained in:
ElderJames 2021-03-15 14:33:43 +08:00
parent 89d263abf2
commit 65d949ca7c
2 changed files with 4 additions and 9 deletions

View File

@ -46,10 +46,7 @@ jobs:
- name: 'Get Last Release'
id: previoustag
run: |
git fetch --tags
# This suppress an error occurred when the repository is a complete one.
git fetch --prune --unshallow || true
LAST_VERSION=$(git describe --abbrev=0 --tags)
LAST_VERSION=$(wget --no-check-certificate -qO- https://api.github.com/repos/ant-design-blazor/ant-design-blazor/tags | grep 'name' | cut -d\" -f4 | head -1)
echo "Last Version: ${LAST_VERSION}"
echo "::set-output name=previous_tag::${LAST_VERSION}"
@ -88,7 +85,7 @@ jobs:
env:
next_version: ${{ steps.get_next_version.outputs.next_version }}
- name: Push to GitHub package registry
- 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 💕
@ -102,9 +99,6 @@ jobs:
- name: Publish Docs 🎉
run: |
npm install
echo "/* updated `date "+%Y-%m-%d %H:%M:%S"` */" >> ./site/AntDesign.Docs.Wasm/wwwroot/service-worker.published.js
cp -rf scripts/gh-pages/* scripts/gh-pages/.nojekyll scripts/gh-pages/.spa ./site/AntDesign.Docs.Wasm/wwwroot
sed -i s/{version}/$PACKAGE_VERSION/g ./site/AntDesign.Docs.Wasm/wwwroot/index.html
sed -i s/{version}/$PACKAGE_VERSION/g ./site/AntDesign.Docs/Shared/HeaderMenu.razor
dotnet publish ./site/AntDesign.Docs.Wasm -c Release -f net5 -o cargo
env:

View File

@ -22,6 +22,7 @@ jobs:
echo "Last Version of ant-design: ${LAST_VERSION}"
git checkout ${LAST_VERSION}
cd ../ant-design-blazor
git checkout feature
BRANCH_NAME="sync-style/${LAST_VERSION}"
if [ $( git branch -a | egrep "remotes/origin/${BRANCH_NAME}" | wc -l) -gt 0 ]; then
echo "Branch ${BRANCH_NAME} already exists."
@ -48,4 +49,4 @@ jobs:
cat>PR<<EOF
chore: sync ant-design v${LAST_VERSION}
EOF
bin/hub pull-request -F PR -b ant-design-blazor:master -h ant-design-blazor:${BRANCH_NAME} -a ElderJames
bin/hub pull-request -F PR -b ant-design-blazor:feature -h ant-design-blazor:${BRANCH_NAME} -a ElderJames