Skip to content

v9.0.0

v9.0.0 #7

# Copyright (c) 2024 <Godwin peter. O>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# Author: Godwin peter. O ([email protected])
# Created At: Wed 11 Dec 2024 20:04:36
# Modified By: Godwin peter. O ([email protected])
# Modified At: Wed 11 Dec 2024 20:04:36
name: Libraries deployment
on:
release:
types: [published]
jobs:
packages-deploy:
env:
BUILD_CONFIG: Release
NUGET_URL: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
NUGET_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- path: "./src/standard/Axolotl.csproj"
- path: "./src/http/Axolotl.Http.csproj"
- path: "./src/efcore/Axolotl.EFCore.csproj"
- path: "./src/aspnet/Axolotl.AspNet.csproj"
- path: "./src/razor/Axolotl.Razor.csproj"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.100
source-url: ${{ env.NUGET_URL }}
- name: Restore
run: dotnet restore ${{ matrix.path }}
- name: Build
run: dotnet build --no-restore ${{ matrix.path }} -c ${{ env.BUILD_CONFIG }}
- name: Test
run: dotnet test ${{ matrix.path }} -c ${{ env.BUILD_CONFIG }} --no-build
- name: Pack
run: dotnet pack --no-build ${{ matrix.path }} -c ${{ env.BUILD_CONFIG }} -o ./artifacts
- name: Update nuget source
run: dotnet nuget update source -s ${{ env.NUGET_URL }} -u ${{ github.repository_owner }} -p ${{ env.NUGET_GIT_TOKEN }} --store-password-in-clear-text github
- name: Publish package to github
run: dotnet nuget push artifacts/*.symbols.nupkg -s ${{ env.NUGET_URL }} -k ${{ env.NUGET_GIT_TOKEN }} --skip-duplicate
- name: Publish package to nuget
run: dotnet nuget push artifacts/*.nupkg -s "https://api.nuget.org/v3/index.json" -k ${{ env.NUGET_AUTH_TOKEN }} --skip-duplicate