-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (40 loc) · 1.24 KB
/
publish.yaml
File metadata and controls
45 lines (40 loc) · 1.24 KB
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
name: Publish to Nuget
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
build-dependencies:
uses: ./.github/workflows/build-dependencies.yaml
publish:
name: Build, Pack & Publish
runs-on: ubuntu-latest
needs: build-dependencies
steps:
- uses: actions/checkout@v3
- name: Assert tag matches project version
run: |
version=$(grep -Po '(?<=<PackageVersion>)[^<]+' Libsql.Client/Libsql.Client.csproj)
if [ ${GITHUB_REF_NAME} != "v$version" ]; then
echo "Tag '$tag' does not match project version '$version'"
exit 1
fi
- name: Download bindings
uses: actions/download-artifact@v5
with:
pattern: bindings-*
merge-multiple: true
path: rust-bindings
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Publish
id: publish-nuget
uses: alirezanet/publish-nuget@v3.1.0
with:
PROJECT_FILE_PATH: Libsql.Client/Libsql.Client.csproj
VERSION_REGEX: ^\s*<PackageVersion>(.*)<\/PackageVersion>\s*$
TAG_COMMIT: false
TAG_FORMAT: "v*"
NUGET_KEY: ${{secrets.NUGET_API_KEY}}