Merge pull request #47 from BurkusCat/handle-back-button #17
Workflow file for this run
This file contains 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: Create a release on NuGet | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
- "v[0-9]+.[0-9]+.[0-9]+-preview[0-9]+" | |
jobs: | |
release-nuget: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Verify commit exists in origin/main | |
run: | | |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
git branch --remote --contains | grep origin/main | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 7.0.x | |
- name: Install .NET MAUI | |
run: dotnet workload install maui | |
- name: Get version information from tag | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Restore dependencies | |
run: dotnet restore src\Burkus.Mvvm.Maui.sln | |
- name: Build | |
run: dotnet build src\Burkus.Mvvm.Maui.sln -c Release /p:Version=${{ steps.get_version.outputs.version-without-v }} | |
- name: Pack | |
run: dotnet pack src\Burkus.Mvvm.Maui\Burkus.Mvvm.Maui.csproj -c Release /p:Version=${{ steps.get_version.outputs.version-without-v }} --no-build --output . | |
- name: Push | |
run: dotnet nuget push Burkus.Mvvm.Maui.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }} |