This repository was archived by the owner on Jun 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
53 lines (50 loc) · 1.4 KB
/
Copy pathrelease.yml
File metadata and controls
53 lines (50 loc) · 1.4 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
53
name: ci
on:
push:
branches: [ master ]
env:
USE_CI_FEED: false
VERSION: 2.0.0-alpha.1
IS_PRERELEASE: false
PROJECT_PATH: src/Telegram.Bot.Extensions.Polling/Telegram.Bot.Extensions.Polling.csproj
CONFIGURATION: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: >
dotnet build
--no-restore
--configuration ${{ env.CONFIGURATION }}
-p:Version=${{ env.VERSION }}
${{ env.PROJECT_PATH }}
- name: Pack
run: >
dotnet pack
--no-build
--output artifacts
--configuration ${{ env.CONFIGURATION }}
-p:Version=${{ env.VERSION }}
${{ env.PROJECT_PATH }}
- name: Publish package to NuGet
run: >
dotnet nuget push
artifacts/*.nupkg
--api-key ${{ secrets.NUGET_API_KEY }}
--skip-duplicate
--source https://api.nuget.org/v3/index.json
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/*.nupkg
tag_name: v${{ env.VERSION }}
prerelease: ${{ env.IS_PRERELEASE }}
fail_on_unmatched_files: true