Merge pull request #91 from gpproton/setup-project-as-trummable #110
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: Standard 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/standard/Axolotl.csproj" | |
- path: "./src/http/Axolotl.Http.csproj" | |
- path: "./src/efcore/Axolotl.EFCore.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 | |
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 |