Add versions to build (#254)

* Add versions to build

* Update build.yml

* Update build.yml

* Update build.yml
This commit is contained in:
Frank A. Krueger 2021-05-12 18:24:56 -07:00 committed by GitHub
parent c509330407
commit 222f6a591a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 3 deletions

View File

@ -17,7 +17,19 @@ jobs:
- name: Checkout submodules - name: Checkout submodules
run: | run: |
git submodule sync 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:<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
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
with: with:
@ -25,6 +37,21 @@ jobs:
- name: Restore dependencies - name: Restore dependencies
run: dotnet restore run: dotnet restore
- name: Build - name: Build
run: dotnet build --no-restore run: dotnet build -c Release --no-restore
- name: Test - 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