Merge branch 'master' of github.com:rabbicse/mehedi.hangfire.extensions #30
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: publish Mehedi.Hangfire.Extensions to nuget | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- 'src/Mehedi.Hangfire.Extensions/**' | |
jobs: | |
publish: | |
name: list on nuget | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest | |
# Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
# Increment the version | |
- name: Bump build version | |
id: bump | |
uses: vers-one/[email protected] | |
with: | |
file: "src/Mehedi.Hangfire.Extensions/Mehedi.Hangfire.Extensions.csproj" | |
version: bump-build | |
- run: | | |
git config user.name "github-actions" | |
git config user.email "[email protected]" | |
git config --global credential.helper store | |
git add . | |
git commit -m "Bump project version to ${{ steps.bump.outputs.newVersion }}" | |
git push | |
# Publish | |
- name: publish on version change | |
id: publish_nuget | |
uses: brandedoutcast/publish-nuget@v2 | |
with: | |
PROJECT_FILE_PATH: src/Mehedi.Hangfire.Extensions/Mehedi.Hangfire.Extensions.csproj # Relative to repository root | |
BUILD_CONFIGURATION: Release | |
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file | |
VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group | |
TAG_COMMIT: true # Flag to enable / disable git tagging | |
TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version | |
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key | |
continue-on-error: true |