Release #7
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
| # This file is auto-generated by Generaptor. | |
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| schedule: | |
| - cron: 0 0 * * 6 | |
| jobs: | |
| release: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-24.04 | |
| env: | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_NOLOGO: 1 | |
| NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - id: version | |
| name: Read version from ref | |
| shell: pwsh | |
| run: echo "version=$(./Scripts/Get-Version.ps1 -RefName $env:GITHUB_REF)" >> $env:GITHUB_OUTPUT | |
| - name: Set up .NET SDK | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: NuGet cache | |
| uses: actions/cache@v4 | |
| with: | |
| key: ${{ runner.os }}.nuget.${{ hashFiles('**/*.fsproj') }} | |
| path: ${{ env.NUGET_PACKAGES }} | |
| - name: Build Release | |
| run: dotnet build -c Release | |
| - name: Pack NuGet package | |
| run: dotnet pack NRayUI -c Release -p:Version=${{ steps.version.outputs.version }} --output nupkg | |
| - name: Publish to NuGet | |
| run: dotnet nuget push nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: Automatic release for NRayUI v${{ steps.version.outputs.version }} | |
| files: nupkg/*.nupkg | |
| name: NRayUI v${{ steps.version.outputs.version }} | |
| tag_name: ${{ github.ref_name }} |