Upgrade to dotnet 10 #295
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: .NET Core | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - 'LICENSE' | |
| - 'src/**' | |
| - 'tests/**' | |
| - '!docs/**' | |
| - '!README.md' | |
| jobs: | |
| build-linux-x64: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Setup | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: 10.0.100 | |
| - name: Version | |
| id: version | |
| run: echo "version=$($PWD/scripts/version.sh)" >> $GITHUB_OUTPUT | |
| - name: Build | |
| run: scripts/build-dotnet.sh | |
| - name: Tests | |
| uses: dorny/test-reporter@v1 | |
| if: always() | |
| with: | |
| name: tests-linux-x64 | |
| path: "**/test-results.trx" | |
| reporter: dotnet-trx | |
| fail-on-error: true | |
| - name: Package | |
| run: scripts/package.sh | |
| - name: Release | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/create-release@v1 | |
| id: release | |
| with: | |
| draft: false | |
| prerelease: false | |
| release_name: ${{ steps.version.outputs.version }} | |
| tag_name: ${{ steps.version.outputs.version }} | |
| body_path: CHANGELOG.md | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} | |
| - name: Upload sql-d.nupkg | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} | |
| with: | |
| upload_url: ${{ steps.release.outputs.upload_url }} | |
| asset_path: packages/sql-d.${{ steps.version.outputs.version }}.nupkg | |
| asset_name: sql-d.${{ steps.version.outputs.version }}.nupkg | |
| asset_content_type: application/gzip | |
| - name: Upload SqlD.UI.tar.gz | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} | |
| with: | |
| upload_url: ${{ steps.release.outputs.upload_url }} | |
| asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.tar.gz | |
| asset_name: SqlD.UI.${{ steps.version.outputs.version }}.tar.gz | |
| asset_content_type: application/gzip | |
| - name: Upload SqlD.UI.zip | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} | |
| with: | |
| upload_url: ${{ steps.release.outputs.upload_url }} | |
| asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.zip | |
| asset_name: SqlD.UI.${{ steps.version.outputs.version }}.zip | |
| asset_content_type: application/gzip | |
| - name: Upload SqlD.UI.deb | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} | |
| with: | |
| upload_url: ${{ steps.release.outputs.upload_url }} | |
| asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.deb | |
| asset_name: SqlD.UI.${{ steps.version.outputs.version }}.deb | |
| asset_content_type: application/gzip | |
| - name: Upload SqlD.UI.rpm | |
| if: github.ref == 'refs/heads/master' | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ github.TOKEN }} | |
| with: | |
| upload_url: ${{ steps.release.outputs.upload_url }} | |
| asset_path: packages/SqlD.UI.${{ steps.version.outputs.version }}.rpm | |
| asset_name: SqlD.UI.${{ steps.version.outputs.version }}.rpm | |
| asset_content_type: application/gzip | |
| - name: Publish NuGet package | |
| if: github.ref == 'refs/heads/master' | |
| run: | | |
| dotnet nuget push packages/sql-d.${{ steps.version.outputs.version }}.nupkg --api-key "${{ secrets.NUGET }}" --source https://api.nuget.org/v3/index.json --skip-duplicate | |
| - name: DockerHub Login | |
| if: github.ref == 'refs/heads/master' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: realorko | |
| password: ${{ secrets.DOCKER }} | |
| - name: DockerHub Build/Push | |
| if: github.ref == 'refs/heads/master' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: "." | |
| file: "docker/Dockerfile" | |
| push: true | |
| tags: realorko/sql-d:${{ steps.version.outputs.version }} | |
| # This is hot garbage, will look at this later ... :/ | |
| # build-win-x64: | |
| # runs-on: windows-latest | |
| # steps: | |
| # - uses: actions/checkout@v1 | |
| # - name: Setup .NET Core | |
| # uses: actions/setup-dotnet@v1 | |
| # with: | |
| # dotnet-version: 8.0.401 | |
| # - name: Build with dotnet win-x64 | |
| # run: .\scripts\build.bat | |
| # shell: cmd | |
| # build-osx-x64: | |
| # runs-on: macos-latest | |
| # steps: | |
| # - uses: actions/checkout@v1 | |
| # - name: Setup .NET Core | |
| # uses: actions/setup-dotnet@v1 | |
| # with: | |
| # dotnet-version: 8.0.401 | |
| # - name: Build with osx-x64 | |
| # run: scripts/build-dotnet.sh |