Skip to content

Commit

Permalink
feat: add release setting for draft (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuju63 authored Jun 24, 2023
1 parent 2ad62c2 commit 84c598f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ on:
description: 'Release version without "v".'
required: true
type: string
test:
description: 'Test flag'
required: false
default: false
type: boolean
create_release:
description: "Need create GitHub Release"
required: false
type: boolean
default: false
draft_release:
description: "Create GitHub Release as draft"
required: false
type: boolean
default: false

jobs:
build:
Expand Down Expand Up @@ -55,10 +55,10 @@ jobs:
with:
name: BatchSharp
- name: Publish NuGet IT
if: inputs.test
if: inputs.create_release
run: dotnet nuget push *.nupkg --source ${{ vars.NUGET_IT_SERVER }} --api-key ${{ secrets.GITHUB_TOKEN }}
- name: Publish NuGet
if: ${{ !inputs.test }}
if: ${{ !inputs.create_release }}
run: dotnet nuget push *.nupkg --source ${{ vars.NUGET_SERVER }} --api-key ${{ secrets.NUGET_API_KEY }}
release:
runs-on: ubuntu-latest
Expand All @@ -81,4 +81,4 @@ jobs:
tag: v${{ inputs.release_version }}
generateReleaseNotes: true
artifacts: "*.nupkg"
draft: ${{ inputs.test }}
draft: ${{ inputs.draft_release }}

0 comments on commit 84c598f

Please sign in to comment.