-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (40 loc) · 1.26 KB
/
ci.yml
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
name: Build & Publish Pre-Release (main)
on:
push:
branches:
- main
paths-ignore:
- '**/Package Release Notes.txt'
workflow_dispatch:
jobs:
build:
name: Build & Test
uses: ./.github/workflows/_build.yml
deploy:
name: Deploy Pre-Release NuGet Packages to Repository Packages
needs: build
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
- name: Push Pre-Release Package to GitHub Packages
if: (format('{0}', env.PACKAGE_KEY) != '')
shell: pwsh
run: dotnet nuget push *.nupkg --api-key ${{ env.PACKAGE_KEY }} --source "https://nuget.pkg.github.com/AdrianJSClark/index.json" --skip-duplicate
working-directory: ./NuGet Packages/
env:
PACKAGE_KEY: ${{ secrets.PACKAGE_UPLOAD }}
- name: Delete Old Packages
uses: smartsquaregmbh/[email protected]
with:
user: AdrianJSClark
type: nuget
keep: 5
dry-run: true
names: |
Aydsko.iRacingData