-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (40 loc) · 2.02 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: build
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Set env
run: |
echo "DOTNET_CLI_TELEMETRY_OPTOUT=1" >> $GITHUB_ENV
echo "DOTNET_hostBuilder:reloadConfigOnChange=false" >> $GITHUB_ENV
- uses: dotnet/nbgv@master
id: nbgv
- name: Clean
run: |
dotnet clean ./SciSharp.MySQL.Replication.sln --configuration Release
dotnet nuget locals all --clear
- name: Build
run: dotnet build -c Debug
- name: Run MySQL
run: |
cp tests/Test/mysql.cnf ~/.my.cnf
sudo systemctl start mysql.service
mysql -e "SET PERSIST binlog_row_metadata = 'FULL';" -uroot -proot
mysql -e 'CREATE DATABASE garden;USE garden;CREATE TABLE pet (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE, timeUpdated datetime);' -uroot -proot
- name: Test
run: |
cd tests/Test
dotnet test
- name: Pack
run: dotnet pack -c Release -p:PackageVersion=${{ steps.nbgv.outputs.NuGetPackageVersion }}.${{ github.run_number }} -p:Version=${{ steps.nbgv.outputs.NuGetPackageVersion }}.${{ github.run_number }} -p:AssemblyVersion=${{ steps.nbgv.outputs.AssemblyVersion }} -p:AssemblyFileVersion=${{ steps.nbgv.outputs.AssemblyFileVersion }} -p:AssemblyInformationalVersion=${{ steps.nbgv.outputs.AssemblyInformationalVersion }} /p:NoPackageAnalysis=true
- name: Push
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.MYGET_API_KEY }} --source https://www.myget.org/F/scisharp/api/v3/index.json