-
-
Notifications
You must be signed in to change notification settings - Fork 70
68 lines (60 loc) · 1.61 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release
on:
workflow_dispatch:
inputs:
version:
description: New release/tag name
required: true
type: string
run-name: Release ${{ inputs.version }}
jobs:
# Build job
# Should only use official actions and tools
build:
name: Build
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build & pack
id: build_pack
run: dotnet build --configuration Release /p:Version=${{ inputs.version }}
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: package
path: ClickHouse.Client/bin/Release/ClickHouse.Client.*nupkg
push_nuget_org:
runs-on: windows-latest
needs: [build]
name: Upload to NuGet.org
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: package
- name: Push package
id: push
shell: cmd
run: dotnet nuget push ClickHouse.Client.*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
github_release:
runs-on: ubuntu-latest
needs: [build]
name: Create GitHub release
permissions:
contents: write
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: package
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: "*.nupkg,*.snupkg"
commit: ${{ github.sha }}
tag: ${{ inputs.version }}
generateReleaseNotes: true
draft: true
prerelease: false