-
Notifications
You must be signed in to change notification settings - Fork 10
67 lines (56 loc) · 1.41 KB
/
publish.yml
File metadata and controls
67 lines (56 loc) · 1.41 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish NuGet
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
shipit-pr:
name: ShipIt - Pull Request
runs-on: ubuntu-latest
if: "!startsWith(github.event.head_commit.message, 'chore: release ')"
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.x
9.x
10.x
- name: Install tools
run: dotnet tool restore
- name: ShipIt (Pull Request)
run: dotnet shipit --pre-release rc
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
if: "startsWith(github.event.head_commit.message, 'chore: release ')"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.x
9.x
10.x
- name: Install just
uses: extractions/setup-just@v4
- name: Install tools
run: |
dotnet tool restore
dotnet restore src
- name: Build, pack and push
run: just release
env:
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}