2021-05-13 00:58:38 +00:00
|
|
|
name: Build
|
2021-05-13 00:49:20 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Checkout submodules
|
|
|
|
run: |
|
|
|
|
git submodule sync
|
2021-05-13 01:24:56 +00:00
|
|
|
git submodule update --init --recursive
|
|
|
|
- name: Update Versions
|
|
|
|
env:
|
|
|
|
VERSION_PREFIX: 0.14
|
|
|
|
VERSION_SUFFIX: ${{github.run_number}}
|
|
|
|
run: |
|
|
|
|
VERSION=$VERSION_PREFIX.$VERSION_SUFFIX
|
|
|
|
sed -ibak "s:<Version>1.0.0</Version>:<Version>$VERSION</Version>:g" Ooui/Ooui.csproj
|
|
|
|
sed -ibak "s:<Version>1.0.0</Version>:<version>$VERSION</version>:g" Ooui.AspNetCore/Ooui.AspNetCore.csproj
|
|
|
|
sed -ibak "s:<Version>1.0.0</Version>:<version>$VERSION</version>:g" Ooui.Forms/Ooui.Forms.csproj
|
|
|
|
sed -ibak "s:version=\"1.0.0\":version=\"$VERSION\":g" Ooui.Wasm/Ooui.Wasm.nuspec
|
|
|
|
sed -ibak2 "s:<version>1.0.0</version>:<version>$VERSION</version>:g" Ooui.Wasm/Ooui.Wasm.nuspec
|
|
|
|
cat Ooui.Wasm/Ooui.Wasm.nuspec
|
2021-05-13 00:49:20 +00:00
|
|
|
- name: Setup .NET
|
|
|
|
uses: actions/setup-dotnet@v1
|
|
|
|
with:
|
|
|
|
dotnet-version: 5.0.x
|
|
|
|
- name: Restore dependencies
|
|
|
|
run: dotnet restore
|
|
|
|
- name: Build
|
2021-05-13 01:24:56 +00:00
|
|
|
run: dotnet build -c Release --no-restore
|
2021-05-13 00:49:20 +00:00
|
|
|
- name: Test
|
2021-05-13 01:24:56 +00:00
|
|
|
run: dotnet test -c Release --no-build --verbosity normal
|
|
|
|
- name: Package
|
|
|
|
run: |
|
|
|
|
mkdir PackageOut
|
|
|
|
cd Ooui
|
|
|
|
dotnet pack --include-symbols --no-build -c Release -v normal -o ../PackageOut
|
|
|
|
cd ../Ooui.AspNetCore
|
|
|
|
dotnet pack --include-symbols --no-build -c Release -v normal -o ../PackageOut
|
|
|
|
cd ../Ooui.Forms
|
|
|
|
dotnet pack --include-symbols --no-build -c Release -v normal -o ../PackageOut
|
|
|
|
cd ../Ooui.Wasm
|
|
|
|
nuget pack -OutputDirectory ../PackageOut
|
|
|
|
- name: Upload Packages
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
path: PackageOut
|