Skip to content

Add suppot for .net9 (#7) #2

Add suppot for .net9 (#7)

Add suppot for .net9 (#7) #2

Workflow file for this run

name: Create a (Pre)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: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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: Get version information from tag
id: get_version
run: |
version="${GITHUB_REF_NAME#v}"
echo "version-without-v=$version" >> $GITHUB_OUTPUT
- name: Pack
run: dotnet pack src/Plugin.Maui.OtpReader/Plugin.Maui.OtpReader.csproj -c Release -p:PackageVersion=${{ steps.get_version.outputs.version-without-v }}
- name: Push
run: dotnet nuget push src/Plugin.Maui.OtpReader/bin/Release/Plugin.Maui.OtpReader.${{ steps.get_version.outputs.version-without-v }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}