-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 2.18 KB
/
Copy pathrelease.yml
File metadata and controls
52 lines (41 loc) · 2.18 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
46
47
48
49
50
51
52
name: Release
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Restore tools
run: dotnet tool restore
- name: Extract version from tag
id: version
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "Release version: $VERSION"
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release -p:Version=${{ steps.version.outputs.version }}
- name: Test
run: dotnet test --no-build -c Release --verbosity normal
- name: Pack
run: |
dotnet pack src/System.Data.Async/System.Data.Async.csproj --no-build -c Release -p:PackageVersion=${{ steps.version.outputs.version }} -o ./artifacts
dotnet pack src/System.Data.Async.Adapters/System.Data.Async.Adapters.csproj --no-build -c Release -p:PackageVersion=${{ steps.version.outputs.version }} -o ./artifacts
dotnet pack src/System.Data.Async.DataSet/System.Data.Async.DataSet.csproj --no-build -c Release -p:PackageVersion=${{ steps.version.outputs.version }} -o ./artifacts
dotnet pack src/System.Data.Async.DataSet.Generator/System.Data.Async.DataSet.Generator.csproj -c Release -p:PackageVersion=${{ steps.version.outputs.version }} -o ./artifacts
dotnet pack src/System.Data.Async.Serialization.NewtonsoftJson/System.Data.Async.Serialization.NewtonsoftJson.csproj --no-build -c Release -p:PackageVersion=${{ steps.version.outputs.version }} -o ./artifacts
dotnet pack src/System.Data.Async.Serialization.SystemTextJson/System.Data.Async.Serialization.SystemTextJson.csproj --no-build -c Release -p:PackageVersion=${{ steps.version.outputs.version }} -o ./artifacts
- name: Push to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json