Release #9
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: Release | |
| on: | |
| release: | |
| types: [published] | |
| env: | |
| NET_VERSION: 10.0.100 | |
| PROJECT_PATH: 'Scr/IeuanWalker.Maui.StateButton.csproj' | |
| NUGET_PATH: './**/IeuanWalker.Maui.StateButton.${{ github.event.release.tag_name }}.nupkg' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Display dotnet info | |
| run: dotnet --info | |
| - name: Setup .NET ${{ env.NET_VERSION }} | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.NET_VERSION }} | |
| - name: Install .NET MAUI ${{ env.NET_VERSION }} | |
| run: dotnet workload install maui --ignore-failed-sources | |
| - name: Display dotnet info | |
| run: dotnet --info | |
| - name: Restore dependencies | |
| run: dotnet restore ${{ env.PROJECT_PATH }} | |
| - name: Build | |
| run: dotnet build ${{ env.PROJECT_PATH }} -c Release /p:Version=${{ github.event.release.tag_name }} --no-restore | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: NuGet | |
| path: ${{ env.NUGET_PATH }} | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v1.1.1 | |
| # Get a short-lived NuGet API key | |
| - name: NuGet login (OIDC → temp API key) | |
| uses: NuGet/login@v1 | |
| id: login | |
| with: | |
| user: Ieuan | |
| - name: Publish | |
| run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{steps.login.outputs.NUGET_API_KEY}} |