-
Notifications
You must be signed in to change notification settings - Fork 34
49 lines (45 loc) · 1.3 KB
/
publish-preview.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
name: Publish preview to GitHub registry
# ==== NOTE: do not rename this yml file or the $GITHUB_RUN_NUMBER will be reset ====
on:
push:
branches:
- master
- dev
paths:
- src/**
- .github/workflows/**
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
source-url: https://nuget.pkg.github.com/destructurama/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
working-directory: src
run: dotnet restore
- name: Build solution [Release]
working-directory: src
run: dotnet build --no-restore -c Release
- name: Pack solution [Release]
working-directory: src
run: dotnet pack --no-build -c Release -o out
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: Nuget packages
path: |
src/out/*
- name: Publish Nuget packages to GitHub registry
working-directory: src
run: dotnet nuget push "out/*" -k ${{secrets.GITHUB_TOKEN}}