-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (28 loc) · 1013 Bytes
/
Copy pathrelease.yml
File metadata and controls
38 lines (28 loc) · 1013 Bytes
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
name: Release
on:
push:
tags: [ "v*" ]
env:
DOTNET_VERSION: '10.0.x'
SOLUTION_PATH: 'src/TextDiff.Sharp.sln'
PROJECT_PATH: 'src/TextDiff.Sharp/TextDiff.Sharp.csproj'
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore ${{ env.SOLUTION_PATH }}
- name: Build
run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release --no-restore
- name: Test
run: dotnet test ${{ env.SOLUTION_PATH }} --configuration Release --no-build
- name: Pack
run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --no-build --output nupkg
- name: Push to NuGet
run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate