Refactor and update database configurations #34
Workflow file for this run
This file contains hidden or 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
| # ====================================================================== | |
| # Publish Nugets: Build, Test and Publish Nuget Packages | |
| # ====================================================================== | |
| name: 'Build/Publish Nugets' | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| permissions: | |
| packages: write | |
| contents: read | |
| id-token: write | |
| env: | |
| SOLUTION_PATH: './ThingsLibrary.Frameworks.slnx' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup .NET 10.0.x | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Set VERSION variable from tag | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
| - name: Restore | |
| run: dotnet restore ${{env.SOLUTION_PATH}} | |
| - name: Build | |
| run: dotnet build ${{env.SOLUTION_PATH}} --configuration Release /p:Version="${VERSION}" --no-restore | |
| - name: Test | |
| run: dotnet test --solution ${{env.SOLUTION_PATH}} -c Release --no-build --results-directory "./Artifacts/Test/0.0.0" --coverage --coverage-output-format cobertura | |
| - name: Pack | |
| run: dotnet pack ${{env.SOLUTION_PATH}} -v normal -c Release /p:Version="${VERSION}" /p:PackageVersion="${VERSION}" /p:PackageReleaseNotes="${{ github.event.inputs.releaseNotes }}" --no-restore --no-build --output "./Artifacts/Build" | |
| if: success() | |
| - name: File Tree | |
| run: tree -a ./Artifacts | |
| # - name: Push to Github | |
| # run: dotnet nuget push ./Artifacts/Build/*.nupkg -k ${API_TOKEN} -s https://nuget.pkg.github.com/things-library/index.json | |
| # env: | |
| # API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push to Nuget.org | |
| run: dotnet nuget push ./Artifacts/Build/*.nupkg -k ${API_TOKEN} -s https://api.nuget.org/v3/index.json | |
| env: | |
| API_TOKEN: ${{ secrets.NUGET_API_KEY }} |