Custom api docs #84
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: Build .NET Application | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| EnableWindowsTargeting: true | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Build | |
| shell: bash | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| dotnet publish -o "publish/" -r win-x64 --configuration Release -p:PublishProfile=FolderProfile QPlayer/QPlayer.csproj | |
| export SolutionDir=$PWD | |
| for proj in $(dotnet sln list | grep QPlayer\\..*Plugin\\.csproj); do dotnet build $proj --configuration Release -r win-x64; done | |
| cp -r $SolutionDir/QPlayer/bin/Release/net10.0-windows/plugins/ publish/ | |
| dotnet publish -o "publish-sc/" -r win-x64 --configuration Release --sc -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true QPlayer/QPlayer.csproj | |
| cp -r $SolutionDir/QPlayer/bin/Release/net10.0-windows/plugins/ publish-sc/ | |
| # Compress build artifacts | |
| - name: Compress build artifacts | |
| uses: thedoctor0/zip-release@0.7.6 | |
| with: | |
| type: zip | |
| filename: ../QPlayer-release.zip | |
| directory: publish/ | |
| - name: Compress build artifacts self-contained | |
| uses: thedoctor0/zip-release@0.7.6 | |
| with: | |
| type: zip | |
| filename: ../QPlayer-release-sc.zip | |
| directory: publish-sc/ | |
| # Upload the build artifacts | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ReleaseBinaries | |
| path: QPlayer-release.zip | |
| - name: Upload build artifacts self-contained | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ReleaseBinariesSC | |
| path: QPlayer-release-sc.zip | |
| create-release: | |
| needs: build | |
| name: "Create Release" | |
| runs-on: "ubuntu-latest" | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download release binaries | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ReleaseBinaries | |
| - name: Download release binaries self-contained | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ReleaseBinariesSC | |
| - uses: "marvinpinto/action-automatic-releases@latest" | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "latest" | |
| prerelease: true | |
| title: "Development Build" | |
| files: | | |
| QPlayer-release.zip | |
| QPlayer-release-sc.zip |