Simplify workflows

This commit is contained in:
Tyrrrz
2023-10-29 00:25:19 +03:00
parent 2ef37ab6d9
commit 9eb84c6649
2 changed files with 17 additions and 26 deletions

View File

@@ -1,12 +1,28 @@
name: main
on: [push, pull_request]
on:
workflow_dispatch:
inputs:
package-version:
type: string
description: Package version string
required: true
deploy:
type: boolean
description: Whether to deploy the package
required: false
default: true
push:
pull_request:
jobs:
main:
uses: Tyrrrz/.github/.github/workflows/nuget.yml@master
with:
dotnet-version: 7.0.x
package-version: ${{ inputs.package-version }}
# Deploy only on tags by default, unless deploy is explicitly requested
deploy-on-tags-only: ${{ !(github.event_name == 'workflow_dispatch' && inputs.deploy) }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}

View File

@@ -1,25 +0,0 @@
name: prerelease
on:
workflow_dispatch:
inputs:
package-version-base:
type: string
description: Package version base
required: true
package-version-suffix:
type: string
description: Package version suffix
required: true
jobs:
prerelease:
uses: Tyrrrz/.github/.github/workflows/nuget.yml@master
with:
dotnet-version: 7.0.x
package-version: ${{ format('{0}-{1}', inputs.package-version-base, inputs.package-version-suffix) }}
deploy-on-tags-only: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}