-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (50 loc) · 1.72 KB
/
Copy pathci.yml
File metadata and controls
66 lines (50 loc) · 1.72 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
name: CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-test-pack:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
- name: Restore
run: dotnet restore ValueTypes/ValueTypes.sln
- name: Lint
run: dotnet format ValueTypes/ValueTypes.sln --verify-no-changes --no-restore --verbosity minimal
- name: Build
run: dotnet build ValueTypes/ValueTypes.sln --configuration Release --no-restore
- name: Test
run: dotnet test ValueTypes/ValueTypes.sln --configuration Release --no-build
- name: Pack
run: dotnet pack ValueTypes/ValueTypes/ValueTypes.csproj --configuration Release --no-build --output artifacts/packages
publish:
if: github.event_name == 'workflow_dispatch'
needs: build-test-pack
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
- name: Restore
run: dotnet restore ValueTypes/ValueTypes/ValueTypes.csproj
- name: Pack
run: dotnet pack ValueTypes/ValueTypes/ValueTypes.csproj --configuration Release --no-restore --output artifacts/packages
- name: NuGet login
id: login
uses: NuGet/login@v1
with:
user: TheFellow
- name: Publish
run: dotnet nuget push artifacts/packages/*.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json