Merge pull request #92 from gpproton/revert-trimming-test #105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Asp.Net libraries deployment | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
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/aspnet/Axolotl.AspNet.csproj" | |
- path: "./src/razor/Axolotl.Razor.csproj" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
source-url: ${{ env.NUGET_URL }} | |
- name: Restore Workloads | |
run: dotnet workload restore ${{ matrix.path }} | |
- 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 source -s "https://api.nuget.org/v3/index.json" -k ${{ env.NUGET_AUTH_TOKEN }} --skip-duplicate |