File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,15 @@ name: Deploy to NuGet
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ environment :
7+ description : ' Environment to deploy to'
8+ required : true
9+ default : ' production'
10+ type : choice
11+ options :
12+ - production
13+ - beta
514
615jobs :
716 deploy :
1019 contents : write
1120 packages : write
1221 id-token : write
13- environment : production
22+ environment : ${{ github.event.inputs.environment }}
1423 steps :
1524 - uses : actions/checkout@v4
1625 with :
2837 VERSION=$(grep -oP '(?<=<Version>).*?(?=</Version>)' EntityFrameworkCore.Sqlite.Concurrency/EFCore.Sqlite.Concurrency.csproj)
2938 echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3039 echo "Detected version: $VERSION"
40+
41+ if [[ $VERSION == *"-"* ]] || [[ "${{ github.event.inputs.environment }}" == "beta" ]]; then
42+ echo "IS_PRERELEASE=true" >> $GITHUB_OUTPUT
43+ else
44+ echo "IS_PRERELEASE=false" >> $GITHUB_OUTPUT
45+ fi
3146
3247 - name : Restore dependencies
3348 run : dotnet restore EntityFrameworkCore.Sqlite.Concurrency/EFCore.Sqlite.Concurrency.csproj
4560 tag_name : v${{ steps.get_version.outputs.VERSION }}
4661 name : Release v${{ steps.get_version.outputs.VERSION }}
4762 draft : false
48- prerelease : false
63+ prerelease : ${{ steps.get_version.outputs.IS_PRERELEASE == 'true' }}
4964 files : |
5065 out/*.nupkg
5166 out/*.snupkg
You can’t perform that action at this time.
0 commit comments