-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (42 loc) · 1.56 KB
/
publish-develop.yml
File metadata and controls
53 lines (42 loc) · 1.56 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: Publish Package (Dev)
on:
push:
branches:
- develop
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Authenticate GitHub Packages
run: |
dotnet nuget remove source githubanddone --configfile src/AndDoneSecureClientLibrary/nuget.config
dotnet nuget add source \
--username ${{ github.repository_owner }} \
--password ${{ secrets.CLIENT_LIBRARY_NUGET_AUTH_TOKEN }} \
--store-password-in-clear-text \
--name githubanddone \
--configfile src/AndDoneSecureClientLibrary/nuget.config \
"https://nuget.pkg.github.com/AndDone-LLC/index.json"
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test --configuration Release --no-restore --no-build
- name: Pack
run: dotnet pack --configuration Release --no-build --output ./nupkg /p:VersionSuffix=dev.${{ github.run_number }}
- name: Push to GitHub Packages (Private)
run: |
dotnet nuget push ./nupkg/*.nupkg \
--api-key ${{ secrets.CLIENT_LIBRARY_NUGET_AUTH_TOKEN }} \
--source "https://nuget.pkg.github.com/AndDone-LLC/index.json" \
--skip-duplicate