From 222f6a591a5365d89617e3be382030d0beeeb117 Mon Sep 17 00:00:00 2001 From: "Frank A. Krueger" Date: Wed, 12 May 2021 18:24:56 -0700 Subject: [PATCH] Add versions to build (#254) * Add versions to build * Update build.yml * Update build.yml * Update build.yml --- .github/workflows/build.yml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0fc22a..96b2b67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,19 @@ jobs: - name: Checkout submodules run: | git submodule sync - git submodule update --init --recursive + 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:1.0.0:$VERSION:g" Ooui/Ooui.csproj + sed -ibak "s:1.0.0:$VERSION:g" Ooui.AspNetCore/Ooui.AspNetCore.csproj + sed -ibak "s:1.0.0:$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:1.0.0:$VERSION:g" Ooui.Wasm/Ooui.Wasm.nuspec + cat Ooui.Wasm/Ooui.Wasm.nuspec - name: Setup .NET uses: actions/setup-dotnet@v1 with: @@ -25,6 +37,21 @@ jobs: - name: Restore dependencies run: dotnet restore - name: Build - run: dotnet build --no-restore + run: dotnet build -c Release --no-restore - name: Test - run: dotnet test --no-build --verbosity normal + 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