Skip to content

Commit

Permalink
ci(.github/workflows/): qqbothub->knifehub
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyungent committed Jan 15, 2023
1 parent 9fe85ca commit cf9bee4
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: QQBotHub Release
name: KnifeHub Release

on:
push:
tags:
- 'QQBotHub-v*'
- 'KnifeHub-v*'

jobs:
build:
Expand All @@ -21,7 +21,7 @@ jobs:

- name: Build
run: |
cd ./src/QQBotHub.Web
cd ./src/KnifeHub.Web
# win-x64
dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true --output ../../win-x64 --self-contained true
# win-x86
Expand All @@ -39,13 +39,13 @@ jobs:
- name: Zip the Build
run: |
zip -r QQBotHub-win-x64.zip ./win-x64/
zip -r QQBotHub-win-x86.zip ./win-x86/
zip -r QQBotHub-linux-x64.zip ./linux-x64/
zip -r QQBotHub-linux-arm.zip ./linux-arm/
zip -r QQBotHub-linux-arm64.zip ./linux-arm64/
zip -r QQBotHub-osx-x64.zip ./osx-x64/
zip -r QQBotHub-osx.10.10-x64.zip ./osx.10.10-x64/
zip -r KnifeHub-win-x64.zip ./win-x64/
zip -r KnifeHub-win-x86.zip ./win-x86/
zip -r KnifeHub-linux-x64.zip ./linux-x64/
zip -r KnifeHub-linux-arm.zip ./linux-arm/
zip -r KnifeHub-linux-arm64.zip ./linux-arm64/
zip -r KnifeHub-osx-x64.zip ./osx-x64/
zip -r KnifeHub-osx.10.10-x64.zip ./osx.10.10-x64/
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
Expand All @@ -58,10 +58,10 @@ jobs:
draft: false
prerelease: false
files: |
QQBotHub-win-x64.zip
QQBotHub-win-x86.zip
QQBotHub-linux-x64.zip
QQBotHub-linux-arm.zip
QQBotHub-linux-arm64.zip
QQBotHub-osx-x64.zip
QQBotHub-osx.10.10-x64.zip
KnifeHub-win-x64.zip
KnifeHub-win-x86.zip
KnifeHub-linux-x64.zip
KnifeHub-linux-arm.zip
KnifeHub-linux-arm64.zip
KnifeHub-osx-x64.zip
KnifeHub-osx.10.10-x64.zip
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: QQBotHub.Sdk NuGet Push
name: KnifeHub.Sdk NuGet Push

on:
push:
tags:
- 'QQBotHub.Sdk-v*'
- 'KnifeHub.Sdk-v*'

jobs:
build:
Expand All @@ -20,7 +20,7 @@ jobs:

- name: Build and Pack
run: |
cd ./src/QQBotHub.Sdk
cd ./src/KnifeHub.Sdk
dotnet build --configuration Release
dotnet pack --configuration Release
dotnet pack --configuration Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
Expand All @@ -38,5 +38,5 @@ jobs:
- name: Push generated package to GitHub registry and NuGet
run: |
nuget push .\src\QQBotHub.Sdk\bin\Release\*.nupkg -Source github -SkipDuplicate
nuget push .\src\QQBotHub.Sdk\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }}
nuget push .\src\KnifeHub.Sdk\bin\Release\*.nupkg -Source github -SkipDuplicate
nuget push .\src\KnifeHub.Sdk\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NUGET_KEY }}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: QQBotHub.Sdk Release
name: KnifeHub.Sdk Release

on:
push:
tags:
- 'QQBotHub.Sdk-v*'
- 'KnifeHub.Sdk-v*'

jobs:
build:
Expand All @@ -21,17 +21,17 @@ jobs:

- name: Build
run: |
cd ./src/QQBotHub.Sdk
cd ./src/KnifeHub.Sdk
dotnet build --configuration Release
ls
ls ./bin/Release/
- name: Zip the Build
run: |
cd ./src/QQBotHub.Sdk/bin/Release
zip -r QQBotHub.Sdk-net6.0.zip ./net6.0/
cd ./src/KnifeHub.Sdk/bin/Release
zip -r KnifeHub.Sdk-net6.0.zip ./net6.0/
cd ../../../../
mv ./src/QQBotHub.Sdk/bin/Release/*.zip ./
mv ./src/KnifeHub.Sdk/bin/Release/*.zip ./
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
Expand All @@ -44,6 +44,6 @@ jobs:
draft: false
prerelease: false
files: |
QQBotHub.Sdk-net6.0.zip
KnifeHub.Sdk-net6.0.zip
LICENSE
README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image CI/CD - Beta - qqbothub-amd-chrome-beta
name: Docker Image CI/CD - Beta - knifehub-amd-chrome-beta

on:
push:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Set outputs
id: vars
run: |
echo ::set-output name=IMAGE_NAME::qqbothub
echo ::set-output name=IMAGE_NAME::knifehub
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

Expand All @@ -35,7 +35,7 @@ jobs:
docker buildx build \
--platform=linux/amd64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile.amd-chrome \
--file src/knifehub.Web/Dockerfile.amd-chrome \
--tag ${{ secrets.DOCKER_USERNAME }}/${{ steps.vars.outputs.IMAGE_NAME }}:${{ steps.last_release.outputs.tag_name }}-amd-chrome-beta \
.
- name: Login to Registry - ghcr.io
Expand All @@ -51,6 +51,6 @@ jobs:
docker buildx build \
--platform=linux/amd64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile.amd-chrome \
--file src/knifehub.Web/Dockerfile.amd-chrome \
--tag $IMAGE_ID:$VERSION \
.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Docker Image CI/CD - Release - qqbothub-amd-chrome
name: Docker Image CI/CD - Release - knifehub-amd-chrome

on:
# release:
# types: [published]
push:
tags:
- 'QQBotHub-v*'
- 'knifehub-v*'

jobs:
# build and push
Expand All @@ -18,9 +18,9 @@ jobs:
id: vars
run: |
#echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
# 去掉前面的 refs/tags/QQBotHub-
# 去掉前面的 refs/tags/knifehub-
echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:19})
echo ::set-output name=IMAGE_NAME::qqbothub
echo ::set-output name=IMAGE_NAME::knifehub
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -34,7 +34,7 @@ jobs:
docker buildx build \
--platform=linux/amd64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile.amd-chrome \
--file src/knifehub.Web/Dockerfile.amd-chrome \
--tag ${{ secrets.DOCKER_USERNAME }}/${{ steps.vars.outputs.IMAGE_NAME }}:${{ steps.vars.outputs.RELEASE_VERSION }}-amd-chrome \
.
- name: Build Image and Push - latest - Docker Hub
Expand All @@ -43,7 +43,7 @@ jobs:
docker buildx build \
--platform=linux/amd64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile.amd-chrome \
--file src/knifehub.Web/Dockerfile.amd-chrome \
--tag ${{ secrets.DOCKER_USERNAME }}/${{ steps.vars.outputs.IMAGE_NAME }}:latest-amd-chrome \
.
Expand All @@ -60,7 +60,7 @@ jobs:
docker buildx build \
--platform=linux/amd64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile.amd-chrome \
--file src/knifehub.Web/Dockerfile.amd-chrome \
--tag $IMAGE_ID:$VERSION-amd-chrome \
.
- name: Build Image and Push - latest - ghcr.io
Expand All @@ -71,6 +71,6 @@ jobs:
docker buildx build \
--platform=linux/amd64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile.amd-chrome \
--file src/knifehub.Web/Dockerfile.amd-chrome \
--tag $IMAGE_ID:latest-amd-chrome \
.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image CI/CD - Beta - qqbothub-beta
name: Docker Image CI/CD - Beta - knifehub-beta

on:
push:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Set outputs
id: vars
run: |
echo ::set-output name=IMAGE_NAME::qqbothub
echo ::set-output name=IMAGE_NAME::knifehub
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -36,7 +36,7 @@ jobs:
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile \
--file src/knifehub.Web/Dockerfile \
--tag ${{ secrets.DOCKER_USERNAME }}/${{ steps.vars.outputs.IMAGE_NAME }}:${{ steps.last_release.outputs.tag_name }}-beta \
.
Expand All @@ -53,6 +53,6 @@ jobs:
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile \
--file src/knifehub.Web/Dockerfile \
--tag $IMAGE_ID:$VERSION \
.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Docker Image CI/CD - Release - qqbothub
name: Docker Image CI/CD - Release - knifehub

on:
# release:
# types: [published]
push:
tags:
- 'QQBotHub-v*'
- 'knifehub-v*'

jobs:
# build and push
Expand All @@ -18,9 +18,9 @@ jobs:
id: vars
run: |
#echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
# 去掉前面的 refs/tags/QQBotHub-
# 去掉前面的 refs/tags/knifehub-
echo ::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF:19})
echo ::set-output name=IMAGE_NAME::qqbothub
echo ::set-output name=IMAGE_NAME::knifehub
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand All @@ -34,7 +34,7 @@ jobs:
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile \
--file src/knifehub.Web/Dockerfile \
--tag ${{ secrets.DOCKER_USERNAME }}/${{ steps.vars.outputs.IMAGE_NAME }}:${{ steps.vars.outputs.RELEASE_VERSION }} \
.
Expand All @@ -44,7 +44,7 @@ jobs:
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile \
--file src/knifehub.Web/Dockerfile \
--tag ${{ secrets.DOCKER_USERNAME }}/${{ steps.vars.outputs.IMAGE_NAME }}:latest \
.
Expand All @@ -61,7 +61,7 @@ jobs:
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile \
--file src/knifehub.Web/Dockerfile \
--tag $IMAGE_ID:$VERSION \
.
Expand All @@ -73,6 +73,6 @@ jobs:
docker buildx build \
--platform=linux/amd64,linux/arm64 \
--output "type=image,push=true" \
--file src/QQBotHub.Web/Dockerfile \
--file src/knifehub.Web/Dockerfile \
--tag $IMAGE_ID:latest \
.
4 changes: 2 additions & 2 deletions .github/workflows/sync-gitee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_PRIVATE_KEY }}
with:
# GitHub 源仓库地址
source-repo: [email protected]:yiyungent/QQBotHub.git
source-repo: [email protected]:yiyungent/KnifeHub.git
# Gitee 目标仓库地址
destination-repo: [email protected]:yiyungent/QQBotHub.git
destination-repo: [email protected]:yiyungent/KnifeHub.git

0 comments on commit cf9bee4

Please sign in to comment.