-
Notifications
You must be signed in to change notification settings - Fork 773
50 lines (39 loc) · 1.42 KB
/
publish-packages-1.0.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
#################################################
################### IMPORTANT ###################
# DON'T RENAME THIS FILE UNLESS WE START
# RELEASING THE VERSION 2.*
################### IMPORTANT ###################
#################################################
name: Pack and publish to MyGet
on:
release:
types: [published]
schedule:
- cron: '0 0 * * *' # once in a day at 00:00
jobs:
build-pack:
runs-on: windows-latest
env:
RunningDotNetPack: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetching all
ref: ${{ github.ref || 'main' }}
- name: Setup dotnet
uses: actions/setup-dotnet@v3
- name: Install dependencies
run: dotnet restore OpenTelemetry.proj
- name: dotnet build
run: dotnet build OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
- name: dotnet pack
run: dotnet pack OpenTelemetry.proj --configuration Release --no-build
- name: Publish Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ github.ref_name }}-packages
path: '**/bin/**/*.*nupkg'
- name: Publish MyGet
run: |
nuget setApiKey ${{ secrets.MYGET_TOKEN }} -Source https://www.myget.org/F/opentelemetry/api/v2/package
nuget push **/bin/**/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package