-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 1.45 KB
/
Library.yaml
File metadata and controls
57 lines (48 loc) · 1.45 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
name: Library
on:
push:
branches: [master]
paths-ignore:
- .github/dependabot.yml
- .vscode/**
- .editorconfig
- .gitignore
pull_request:
paths-ignore:
- .github/dependabot.yml
- .vscode/**
- .editorconfig
- .gitignore
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
library:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2
- name: Setup .NET
uses: actions/setup-dotnet@v5.2.0
with:
dotnet-version: 9.0
- name: Lint dotnet
run: dotnet format --verify-no-changes --verbosity detailed
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Pack
run: |
TAG=$(date +%Y.%-m.%-d.)${{ github.run_number }}
REPOSITORYURL=${{ github.server_url }}/${{ github.repository }}
echo TAG=$TAG
echo REPOSITORYURL=$REPOSITORYURL
dotnet pack -p:PackageVersion=$TAG -p:RepositoryUrl=$REPOSITORYURL
- name: Publish
if: github.event_name == 'push' && !github.event.dryrun
run: |
dotnet nuget push artifacts/package/release/*.nupkg \
--api-key ${{ github.token }} \
--source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json \
--skip-duplicate \
--no-symbols