Bump the nuget group with 5 updates #367
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: main | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "*" | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1 | |
| # Build the project separately to discern between build and format errors | |
| - name: Build | |
| run: > | |
| dotnet build | |
| -p:CSharpier_Bypass=true | |
| --configuration Release | |
| - name: Verify formatting | |
| id: verify | |
| run: > | |
| dotnet build | |
| -t:CSharpierFormat | |
| --configuration Release | |
| --no-restore | |
| - name: Report issues | |
| if: ${{ failure() && steps.verify.outcome == 'failure' }} | |
| run: echo "::error title=Bad formatting::Formatting issues detected. Please build the solution locally to fix them." | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1 | |
| - name: Run tests | |
| run: > | |
| dotnet test | |
| -p:CSharpier_Bypass=true | |
| --configuration Release | |
| --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" | |
| --collect:"XPlat Code Coverage" | |
| -- | |
| RunConfiguration.CollectSourceInformation=true | |
| DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| pack: | |
| strategy: | |
| matrix: | |
| rid: | |
| - win-arm64 | |
| - win-x86 | |
| - win-x64 | |
| # Needs to run on Windows to create the installer | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| actions: write | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@2016bd2012dba4e32de620c46fe006a3ac9f0602 # v5.0.1 | |
| - name: Publish app | |
| run: > | |
| dotnet publish LightBulb | |
| -p:Version=${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }} | |
| -p:CSharpier_Bypass=true | |
| --output LightBulb/bin/publish/ | |
| --configuration Release | |
| --runtime ${{ matrix.rid }} | |
| --self-contained | |
| - name: Create installer | |
| shell: pwsh | |
| env: | |
| INSTALLER_APP_VERSION: ${{ github.ref_type == 'tag' && github.ref_name || format('999.9.9-ci-{0}', github.sha) }} | |
| run: | | |
| choco install innosetup --no-progress | |
| Copy-Item -Path LightBulb/bin/publish/ -Recurse -Destination Installer/Source/ | |
| & "c:\Program Files (x86)\Inno Setup 6\ISCC.exe" Installer/Installer.iss | |
| - name: Upload app binaries (portable) | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: LightBulb.${{ matrix.rid }} | |
| path: LightBulb/bin/publish/ | |
| if-no-files-found: error | |
| - name: Upload app binaries (installer) | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: LightBulb-Installer.${{ matrix.rid }} | |
| path: Installer/bin/LightBulb-Installer.exe | |
| if-no-files-found: error | |
| release: | |
| if: ${{ github.ref_type == 'tag' }} | |
| needs: | |
| - format | |
| - test | |
| - pack | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Create release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: > | |
| gh release create ${{ github.ref_name }} | |
| --repo ${{ github.event.repository.full_name }} | |
| --title ${{ github.ref_name }} | |
| --generate-notes | |
| --verify-tag | |
| deploy: | |
| needs: release | |
| strategy: | |
| matrix: | |
| rid: | |
| - win-arm64 | |
| - win-x86 | |
| - win-x64 | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| actions: read | |
| contents: write | |
| steps: | |
| - name: Download app binaries (portable) | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: LightBulb.${{ matrix.rid }} | |
| path: LightBulb/ | |
| - name: Download app binaries (installer) | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: LightBulb-Installer.${{ matrix.rid }} | |
| - name: Create package (portable) | |
| # Change into the artifacts directory to avoid including the directory itself in the zip archive | |
| working-directory: LightBulb/ | |
| run: zip -r ../LightBulb.${{ matrix.rid }}.zip . | |
| - name: Create package (installer) | |
| run: mv LightBulb-Installer.exe LightBulb-Installer.${{ matrix.rid }}.exe | |
| - name: Create release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: > | |
| gh release upload ${{ github.ref_name }} | |
| LightBulb.${{ matrix.rid }}.zip | |
| LightBulb-Installer.${{ matrix.rid }}.exe | |
| --repo ${{ github.event.repository.full_name }} | |
| notify: | |
| needs: deploy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Notify Discord | |
| uses: tyrrrz/action-http-request@1dd7ad841a34b9299f3741f7c7399f9feefdfb08 # 1.1.3 | |
| with: | |
| url: ${{ secrets.DISCORD_WEBHOOK }} | |
| method: POST | |
| headers: | | |
| Content-Type: application/json; charset=UTF-8 | |
| body: | | |
| { | |
| "avatar_url": "https://raw.githubusercontent.com/${{ github.event.repository.full_name }}/${{ github.ref_name }}/favicon.png", | |
| "content": "[**${{ github.event.repository.name }}**](<${{ github.event.repository.html_url }}>) v${{ github.ref_name }} has been released!" | |
| } | |
| retry-count: 5 |