Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
ci: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed Dec 9, 2020
1 parent f50af40 commit f592ee5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 61 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/build-docker.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/build-package.yml

This file was deleted.

54 changes: 52 additions & 2 deletions .github/workflows/build-binary.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Binary
name: Build

on: [push, pull_request]

Expand All @@ -22,9 +22,59 @@ jobs:
run: dotnet build ./src/kaiheila-onebot.csproj --configuration Release --no-restore
- name: Test
run: dotnet test ./test/kaiheila-onebot-test.csproj --no-restore --verbosity normal

pack:
name: Build Package

needs: [build]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0'
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build ./src/kaiheila-onebot.csproj --configuration Release --no-restore
- name: Pack
run: dotnet pack ./src/kaiheila-onebot.csproj -o src/bin/publish/ --configuration Release --no-restore
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: kaiheila-onebot-nupkg-${{ github.sha }}
path: src/bin/publish

docker:
name: Build Image

needs: [build]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Docker Build
run: docker build -t kaiheila-onebot .
- name: Export Image
run: |
mkdir image
docker save kaiheila-onebot > ./image/kaiheila-onebot-docker.tar
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: kaiheila-onebot-docker-${{ github.sha }}
path: image

publish:
name: Publish
name: Build Binary

strategy:
matrix:
Expand Down

0 comments on commit f592ee5

Please sign in to comment.