Refactor MetadataProvider to improve table metadata retrieval logic (… #22
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
| name: dotnet release | |
| on: | |
| push: | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| env: | |
| VERSION: 0.0.1 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: nuget | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Verify commit exists in origin/main | |
| run: | | |
| git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
| git branch --remote --contains | grep origin/main | |
| - name: Set Version Variable | |
| if: ${{ github.ref_type == 'tag' }} | |
| env: | |
| TAG: ${{ github.ref_name }} | |
| run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Setup .NET 9.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore /p:Version=$VERSION | |
| - name: Test | |
| run: dotnet test --configuration Release --no-restore --no-build --verbosity normal | |
| - name: Pack nuget packages | |
| run: dotnet pack --configuration Release --no-restore --no-build --output nupkgs /p:PackageVersion=$VERSION | |
| - name: Upload nuget package | |
| if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') | |
| run: dotnet nuget push nupkgs/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json |