-
-
Notifications
You must be signed in to change notification settings - Fork 84
45 lines (39 loc) · 1.42 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# This is a basic workflow that is manually triggered
name: release
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
inputs:
version:
description: "version"
required: true
default: "0"
run-name: "Release: ${{ github.event.inputs.version }}"
jobs:
build_release:
name: create release
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Cache NuGet Packages
uses: actions/cache@v4
with:
key: nuget-cache
path: ~/.nuget/packages
- name: Build
run: dotnet build ./src/Hangfire.Mongo/Hangfire.Mongo.csproj -c Release -nowarn:CA2021 /p:AssemblyVersion=${{ github.event.inputs.version }} /p:Version=${{ github.event.inputs.version }}
- name: Create a Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Release ${{ github.event.inputs.version }}
tag_name: ${{ github.event.inputs.version }}
draft: false
prerelease: false
- name: Publish to nuget.org
run: dotnet nuget push src/Hangfire.Mongo/bin/Release/Hangfire.Mongo.${{ github.event.inputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json