-
-
Notifications
You must be signed in to change notification settings - Fork 802
57 lines (49 loc) · 1.69 KB
/
publish.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
49
50
51
52
53
54
55
56
57
# Builds a final release version and pushes to nuget.org
# whenever a release is published.
# Requires: secrets.NUGET_API_KEY
name: publish
on:
release:
types: [prereleased, released]
env:
DOTNET_NOLOGO: true
Configuration: Release
PackOnBuild: true
GeneratePackageOnBuild: true
VersionLabel: ${{ github.ref }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
MSBUILDTERMINALLOGGER: auto
jobs:
publish:
runs-on: ${{ vars.PUBLISH_AGENT || 'ubuntu-latest' }}
steps:
- name: 🤘 checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: 🙏 build
run: dotnet build -m:1 -bl:build.binlog
- name: 🧪 test
run: |
dotnet tool update -g dotnet-retest
dotnet retest -- --no-build
- name: 🐛 logs
uses: actions/upload-artifact@v3
if: runner.debug && always()
with:
name: logs
path: '*.binlog'
- name: 🚀 nuget
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: ${{ env.NUGET_API_KEY != '' && github.event.action != 'prereleased' }}
working-directory: bin
run: dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate
- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
if: env.SLEET_CONNECTION != ''
run: |
dotnet tool install -g --version 4.0.18 sleet
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"